nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 mkCoqDerivation,
4 coq,
5 version ? null,
6}:
7
8mkCoqDerivation {
9 pname = "autosubst-ocaml";
10 owner = "uds-psl";
11
12 release."1.1+9.0".sha256 = "sha256-fCQjmF+0ik2QdKog61VfIv5ERmw+AJO8y5+CWmDGGk0=";
13 release."1.1+8.20".sha256 = "sha256-S3uKkwbGFsvauP9lKc3UsdszHahbZQhlOOK3fCBXlSE=";
14 release."1.1+8.19".sha256 = "sha256-AGbhw/6lg4GpDE6hZBhau9DLW7HVXa0UzGvJfSV8oHE=";
15
16 inherit version;
17 defaultVersion =
18 with lib.versions;
19 lib.switch coq.coq-version [
20 {
21 case = isEq "9.0";
22 out = "1.1+9.0";
23 }
24 {
25 case = isEq "8.20";
26 out = "1.1+8.20";
27 }
28 {
29 case = isEq "8.19";
30 out = "1.1+8.19";
31 }
32 ] null;
33
34 buildInputs = with coq.ocamlPackages; [
35 angstrom
36 ocamlgraph
37 ppx_deriving
38 ppxlib
39 ];
40 useDune = true;
41
42 buildPhase = ''
43 dune build
44 '';
45
46 installPhase = ''
47 dune install --prefix $out --libdir $OCAMLFIND_DESTDIR
48 '';
49
50 meta = {
51 description = "OCaml reimplementation of the Autosubst 2 code generator";
52 homepage = "https://github.com/uds-psl/autosubst-ocaml";
53 mainProgram = "autosubst";
54 maintainers = with lib.maintainers; [ chen ];
55 license = lib.licenses.mit;
56 };
57}