forked from mirrors/nixpkgs
OCaml build support: add oasis build system
This commit is contained in:
parent
ff13b6f1ac
commit
2ea2643b13
31
pkgs/build-support/ocaml/oasis.nix
Normal file
31
pkgs/build-support/ocaml/oasis.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ buildOcaml, ocaml_oasis }:
|
||||
|
||||
{ name, version, buildInputs ? [], ...
|
||||
}@args:
|
||||
|
||||
buildOcaml (args // {
|
||||
buildInputs = [ ocaml_oasis ] ++ buildInputs;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
oasis setup
|
||||
ocaml setup.ml -configure
|
||||
ocaml setup.ml -build
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
ocaml setup.ml -test
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
sed -i s+/usr/local+$out+g setup.ml
|
||||
sed -i s+/usr/local+$out+g setup.data
|
||||
prefix=$OCAMLFIND_DESTDIR ocaml setup.ml -install
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
|
@ -12,6 +12,8 @@ let
|
|||
|
||||
buildOcaml = callPackage ../build-support/ocaml { };
|
||||
|
||||
buildOasisPackage = callPackage ../build-support/ocaml/oasis.nix { buildOcaml = buildOcaml; };
|
||||
|
||||
buildDunePackage = callPackage ../build-support/ocaml/dune.nix {};
|
||||
|
||||
alcotest = callPackage ../development/ocaml-modules/alcotest {};
|
||||
|
|
Loading…
Reference in a new issue