Skip to content

Commit dd40bff

Browse files
authored
prep 0.1 (#4)
* prep 0.1 * changes.md wip * license, opam file
1 parent a504c08 commit dd40bff

6 files changed

+252
-6
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## 0.1.0 (2023-10-09)
2+
3+
- Initial release
4+

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2017-2022 Neil Kistner <[email protected]> (neilkistner.com)
4+
Copyright (c) 2022- Melange Authors
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

flake.lock

+151
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
description = "melange-testing-library Nix Flake";
3+
4+
inputs.nix-filter.url = "github:numtide/nix-filter";
5+
inputs.flake-utils.url = "github:numtide/flake-utils";
6+
inputs.nixpkgs = {
7+
url = "github:nix-ocaml/nix-overlays";
8+
inputs.flake-utils.follows = "flake-utils";
9+
};
10+
inputs.melange-src = {
11+
url = "github:melange-re/melange";
12+
inputs.nix-filter.follows = "nix-filter";
13+
inputs.flake-utils.follows = "flake-utils";
14+
inputs.nixpkgs.follows = "nixpkgs";
15+
};
16+
17+
outputs = { self, nixpkgs, flake-utils, nix-filter, melange-src }:
18+
flake-utils.lib.eachDefaultSystem (system:
19+
let
20+
pkgs = nixpkgs.legacyPackages."${system}".appendOverlays [
21+
(self: super: {
22+
ocamlPackages = super.ocaml-ng.ocamlPackages_5_1.overrideScope' (oself: osuper:
23+
with oself;
24+
{
25+
bisect_ppx = osuper.bisect_ppx.overrideAttrs (o: {
26+
src = super.fetchFromGitHub {
27+
owner = "aantron";
28+
repo = "bisect_ppx";
29+
rev = "a14c5b5cd4564d2992dd1b14238922029bc1b1d7";
30+
hash = "sha256-zu4YZO9QZdhIa+0IF0KMnPDQJGNUz2+oaFjaWLY7dn0=";
31+
};
32+
nativeBuildInputs = o.nativeBuildInputs ++ [ melange ];
33+
propagatedBuildInputs = o.propagatedBuildInputs ++ [ melange ];
34+
});
35+
});
36+
})
37+
melange-src.overlays.default
38+
];
39+
inherit (pkgs) nodejs_latest lib stdenv darwin;
40+
41+
melange-testing-library = with pkgs.ocamlPackages; buildDunePackage {
42+
pname = "melange-testing-library";
43+
version = "dev";
44+
45+
src = ./.;
46+
nativeBuildInputs = with pkgs.ocamlPackages; [ melange ];
47+
checkInputs = [ bisect_ppx melange-jest melange-webapi ];
48+
doCheck = true;
49+
propagatedBuildInputs = with pkgs.ocamlPackages; [ melange ];
50+
};
51+
52+
mkShell = { buildInputs ? [ ] }: pkgs.mkShell {
53+
inputsFrom = [ melange-testing-library ];
54+
nativeBuildInputs = with pkgs; [
55+
yarn
56+
nodejs_latest
57+
] ++ (with pkgs.ocamlPackages; [
58+
ocamlformat
59+
merlin
60+
reason
61+
reason-react
62+
]);
63+
inherit buildInputs;
64+
};
65+
in
66+
rec {
67+
packages.default = melange-testing-library;
68+
devShells = {
69+
default = mkShell { };
70+
release = mkShell {
71+
buildInputs = with pkgs; [ cacert curl ocamlPackages.dune-release git ];
72+
};
73+
};
74+
});
75+
}

melange-testing-library.opam

-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,5 @@ depexts: [
3737
["@testing-library/dom"] {npm-version = "^7.26.3"}
3838
]
3939
pin-depends: [
40-
[ "melange-jest.dev" "git+https://github.com/melange-community/melange-jest.git#80716114011fe781ea6242344dce35835792ffeb" ]
41-
[ "melange-webapi.dev" "git+https://github.com/melange-community/melange-webapi.git#1f53fc044e49b4c63e52881b555ea29bec14291c" ]
42-
[ "melange-fetch.dev" "git+https://github.com/melange-community/melange-fetch.git#c23f34e5f21de2dd6bec78aef3f253ab0a3f01b4" ]
4340
[ "bisect_ppx.dev" "git+https://github.com/jchavarri/bisect_ppx.git#a14c5b5cd4564d2992dd1b14238922029bc1b1d7" ]
4441
]

melange-testing-library.opam.template

-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@ depexts: [
33
["@testing-library/dom"] {npm-version = "^7.26.3"}
44
]
55
pin-depends: [
6-
[ "melange-jest.dev" "git+https://github.com/melange-community/melange-jest.git#80716114011fe781ea6242344dce35835792ffeb" ]
7-
[ "melange-webapi.dev" "git+https://github.com/melange-community/melange-webapi.git#1f53fc044e49b4c63e52881b555ea29bec14291c" ]
8-
[ "melange-fetch.dev" "git+https://github.com/melange-community/melange-fetch.git#c23f34e5f21de2dd6bec78aef3f253ab0a3f01b4" ]
96
[ "bisect_ppx.dev" "git+https://github.com/jchavarri/bisect_ppx.git#a14c5b5cd4564d2992dd1b14238922029bc1b1d7" ]
107
]

0 commit comments

Comments
 (0)