Suggested edits
This commit is contained in:
parent
961b83a99d
commit
6e6c1448fa
@ -1,11 +1,9 @@
|
|||||||
{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild, camlp4 }:
|
{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:
|
||||||
|
|
||||||
{ name, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
|
{ name, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
|
||||||
minimumOcamlVersion ? null,
|
minimumOcamlVersion ? null,
|
||||||
createFindlibDestdir ? true,
|
createFindlibDestdir ? true,
|
||||||
dontStrip ? true,
|
dontStrip ? true,
|
||||||
hasSharedObjects ? false,
|
|
||||||
setupHook ? null,
|
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
|
|
||||||
@ -13,9 +11,9 @@
|
|||||||
stdenv.lib.versionOlder minimumOcamlVersion ocaml.version;
|
stdenv.lib.versionOlder minimumOcamlVersion ocaml.version;
|
||||||
|
|
||||||
stdenv.mkDerivation (args // {
|
stdenv.mkDerivation (args // {
|
||||||
name = "ocaml-${name}-${version}";
|
name = "ocaml${ocaml.version}-${name}-${version}";
|
||||||
|
|
||||||
buildInputs = [ ocaml findlib ocamlbuild camlp4 ocaml_oasis ] ++ buildInputs;
|
buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ buildInputs;
|
||||||
|
|
||||||
inherit createFindlibDestdir;
|
inherit createFindlibDestdir;
|
||||||
inherit dontStrip;
|
inherit dontStrip;
|
||||||
@ -43,10 +41,4 @@ stdenv.mkDerivation (args // {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupHook = if setupHook == null && hasSharedObjects
|
|
||||||
then stdenv.writeText "setupHook.sh" ''
|
|
||||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
|
|
||||||
''
|
|
||||||
else setupHook;
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user