treewide: use ocaml.version (#19192)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user