Skip to content

Commit

Permalink
autosubst-ocaml: init at 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cu1ch3n committed Nov 12, 2024
1 parent 0fd3485 commit fd3c5e7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_12;
};

autosubst-ocaml = pkgs.coqPackages_8_19.callPackage ./pkgs/coqPackages/autosubst-ocaml {};

ott-sweirich = pkgs.callPackage ./pkgs/ott-sweirich {
ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_12;
};
Expand Down
47 changes: 47 additions & 0 deletions pkgs/coqPackages/autosubst-ocaml/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
lib,
mkCoqDerivation,
coq,
version ? null,
}:

mkCoqDerivation {
pname = "autosubst-ocaml";
owner = "uds-psl";

release."1.1+8.19".sha256 = "sha256-AGbhw/6lg4GpDE6hZBhau9DLW7HVXa0UzGvJfSV8oHE=";

inherit version;
defaultVersion =
with lib.versions;
lib.switch coq.coq-version [
{
case = isEq "8.19";
out = "1.1+8.19";
}
] null;

propagatedBuildInputs = with coq.ocamlPackages; [
angstrom
ocamlgraph
ppx_deriving
ppxlib
];
useDune = true;

buildPhase = ''
dune build
'';

installPhase = ''
dune install --prefix $out --libdir $OCAMLFIND_DESTDIR
'';

meta = with lib; {
description = "An OCaml reimplementation of the Autosubst 2 code generator";
homepage = "https://github.com/uds-psl/autosubst-ocaml";
mainProgram = "autosubst";
maintainers = with maintainers; [ chen ];
license = licenses.mit;
};
}

0 comments on commit fd3c5e7

Please sign in to comment.