Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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+8.20".sha256 = "sha256-S3uKkwbGFsvauP9lKc3UsdszHahbZQhlOOK3fCBXlSE="; 13 release."1.1+8.19".sha256 = "sha256-AGbhw/6lg4GpDE6hZBhau9DLW7HVXa0UzGvJfSV8oHE="; 14 15 inherit version; 16 defaultVersion = 17 with lib.versions; 18 lib.switch coq.coq-version [ 19 { 20 case = isEq "8.20"; 21 out = "1.1+8.20"; 22 } 23 { 24 case = isEq "8.19"; 25 out = "1.1+8.19"; 26 } 27 ] null; 28 29 buildInputs = with coq.ocamlPackages; [ 30 angstrom 31 ocamlgraph 32 ppx_deriving 33 ppxlib 34 ]; 35 useDune = true; 36 37 buildPhase = '' 38 dune build 39 ''; 40 41 installPhase = '' 42 dune install --prefix $out --libdir $OCAMLFIND_DESTDIR 43 ''; 44 45 meta = with lib; { 46 description = "OCaml reimplementation of the Autosubst 2 code generator"; 47 homepage = "https://github.com/uds-psl/autosubst-ocaml"; 48 mainProgram = "autosubst"; 49 maintainers = with maintainers; [ chen ]; 50 license = licenses.mit; 51 }; 52}