jasmin-compiler: install the OCaml libraries
And split into multiple outputs - the default `bin` contains the Jasmin compilers - the `lib` output contains the EasyCrypt support library - the remaining `out` contains the OCaml libraries
This commit is contained in:
parent
4afa90a84f
commit
8f6236baec
1 changed files with 17 additions and 9 deletions
|
@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
|
|||
|
||||
sourceRoot = "jasmin-compiler-v${version}/compiler";
|
||||
|
||||
# Released tarball contains extraneous `dune` files
|
||||
# See https://github.com/jasmin-lang/jasmin/pull/495
|
||||
preBuild = ''
|
||||
rm -rf tests
|
||||
'';
|
||||
|
||||
nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_3 menhir camlidl cmdliner ];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -18,21 +24,23 @@ stdenv.mkDerivation rec {
|
|||
ppl
|
||||
] ++ (with ocamlPackages; [
|
||||
apron
|
||||
yojson
|
||||
]);
|
||||
|
||||
propagatedBuildInputs = with ocamlPackages; [
|
||||
batteries
|
||||
menhirLib
|
||||
yojson
|
||||
zarith
|
||||
]);
|
||||
];
|
||||
|
||||
outputs = [ "bin" "lib" "out" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
for p in jasminc jazz2tex
|
||||
do
|
||||
cp _build/default/entry/$p.exe $out/bin/$p
|
||||
done
|
||||
mkdir -p $out/lib/jasmin/easycrypt
|
||||
cp ../eclib/*.ec $out/lib/jasmin/easycrypt
|
||||
dune build @install
|
||||
dune install --prefix=$bin --libdir=$out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib
|
||||
mkdir -p $lib/lib/jasmin/easycrypt
|
||||
cp ../eclib/*.ec $lib/lib/jasmin/easycrypt
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue