treewide: use ocaml.version (#19192)

This commit is contained in:
Kirill Boltaev
2016-10-05 09:32:30 +02:00
committed by vbgl
parent 916364af72
commit 3e646865f4
49 changed files with 170 additions and 287 deletions
+2 -4
View File
@@ -9,13 +9,12 @@
meta ? {}, ...
}@args:
let
ocaml_version = (builtins.parseDrvName ocaml.name).version;
defaultMeta = {
platforms = ocaml.meta.platforms or [];
};
in
assert minimumSupportedOcamlVersion != null ->
stdenv.lib.versionOlder minimumSupportedOcamlVersion ocaml_version;
stdenv.lib.versionOlder minimumSupportedOcamlVersion ocaml.version;
stdenv.mkDerivation (args // {
name = "ocaml-${name}-${version}";
@@ -24,11 +23,10 @@ stdenv.mkDerivation (args // {
setupHook = if setupHook == null && hasSharedObjects
then writeText "setupHook.sh" ''
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml_version}/site-lib/${name}/"
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
''
else setupHook;
inherit ocaml_version;
inherit createFindlibDestdir;
inherit dontStrip;