Skip to content

Commit

Permalink
prep 0.1 (#4)
Browse files Browse the repository at this point in the history
* prep 0.1

* changes.md wip

* license, opam file
  • Loading branch information
anmonteiro authored Oct 10, 2023
1 parent a504c08 commit dd40bff
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 0.1.0 (2023-10-09)

- Initial release

22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2017-2022 Neil Kistner <[email protected]> (neilkistner.com)
Copyright (c) 2022- Melange Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
151 changes: 151 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
description = "melange-testing-library Nix Flake";

inputs.nix-filter.url = "github:numtide/nix-filter";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs = {
url = "github:nix-ocaml/nix-overlays";
inputs.flake-utils.follows = "flake-utils";
};
inputs.melange-src = {
url = "github:melange-re/melange";
inputs.nix-filter.follows = "nix-filter";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};

outputs = { self, nixpkgs, flake-utils, nix-filter, melange-src }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}".appendOverlays [
(self: super: {
ocamlPackages = super.ocaml-ng.ocamlPackages_5_1.overrideScope' (oself: osuper:
with oself;
{
bisect_ppx = osuper.bisect_ppx.overrideAttrs (o: {
src = super.fetchFromGitHub {
owner = "aantron";
repo = "bisect_ppx";
rev = "a14c5b5cd4564d2992dd1b14238922029bc1b1d7";
hash = "sha256-zu4YZO9QZdhIa+0IF0KMnPDQJGNUz2+oaFjaWLY7dn0=";
};
nativeBuildInputs = o.nativeBuildInputs ++ [ melange ];
propagatedBuildInputs = o.propagatedBuildInputs ++ [ melange ];
});
});
})
melange-src.overlays.default
];
inherit (pkgs) nodejs_latest lib stdenv darwin;

melange-testing-library = with pkgs.ocamlPackages; buildDunePackage {
pname = "melange-testing-library";
version = "dev";

src = ./.;
nativeBuildInputs = with pkgs.ocamlPackages; [ melange ];
checkInputs = [ bisect_ppx melange-jest melange-webapi ];
doCheck = true;
propagatedBuildInputs = with pkgs.ocamlPackages; [ melange ];
};

mkShell = { buildInputs ? [ ] }: pkgs.mkShell {
inputsFrom = [ melange-testing-library ];
nativeBuildInputs = with pkgs; [
yarn
nodejs_latest
] ++ (with pkgs.ocamlPackages; [
ocamlformat
merlin
reason
reason-react
]);
inherit buildInputs;
};
in
rec {
packages.default = melange-testing-library;
devShells = {
default = mkShell { };
release = mkShell {
buildInputs = with pkgs; [ cacert curl ocamlPackages.dune-release git ];
};
};
});
}
3 changes: 0 additions & 3 deletions melange-testing-library.opam
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,5 @@ depexts: [
["@testing-library/dom"] {npm-version = "^7.26.3"}
]
pin-depends: [
[ "melange-jest.dev" "git+https://github.com/melange-community/melange-jest.git#80716114011fe781ea6242344dce35835792ffeb" ]
[ "melange-webapi.dev" "git+https://github.com/melange-community/melange-webapi.git#1f53fc044e49b4c63e52881b555ea29bec14291c" ]
[ "melange-fetch.dev" "git+https://github.com/melange-community/melange-fetch.git#c23f34e5f21de2dd6bec78aef3f253ab0a3f01b4" ]
[ "bisect_ppx.dev" "git+https://github.com/jchavarri/bisect_ppx.git#a14c5b5cd4564d2992dd1b14238922029bc1b1d7" ]
]
3 changes: 0 additions & 3 deletions melange-testing-library.opam.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ depexts: [
["@testing-library/dom"] {npm-version = "^7.26.3"}
]
pin-depends: [
[ "melange-jest.dev" "git+https://github.com/melange-community/melange-jest.git#80716114011fe781ea6242344dce35835792ffeb" ]
[ "melange-webapi.dev" "git+https://github.com/melange-community/melange-webapi.git#1f53fc044e49b4c63e52881b555ea29bec14291c" ]
[ "melange-fetch.dev" "git+https://github.com/melange-community/melange-fetch.git#c23f34e5f21de2dd6bec78aef3f253ab0a3f01b4" ]
[ "bisect_ppx.dev" "git+https://github.com/jchavarri/bisect_ppx.git#a14c5b5cd4564d2992dd1b14238922029bc1b1d7" ]
]

0 comments on commit dd40bff

Please sign in to comment.