ocamlPackages.sosa: fix for OCaml ≥ 5.0
This commit is contained in:
parent
cba62cad70
commit
5bd5a25808
@ -2,9 +2,8 @@
|
|||||||
, findlib, ocaml, ocamlbuild
|
, findlib, ocaml, ocamlbuild
|
||||||
}:
|
}:
|
||||||
|
|
||||||
if lib.versionOlder ocaml.version "4.02"
|
lib.throwIf (lib.versionOlder ocaml.version "4.02")
|
||||||
then throw "sosa is not available for OCaml ${ocaml.version}"
|
"sosa is not available for OCaml ${ocaml.version}"
|
||||||
else
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "ocaml${ocaml.version}-sosa";
|
pname = "ocaml${ocaml.version}-sosa";
|
||||||
@ -17,6 +16,13 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "053hdv6ww0q4mivajj4iyp7krfvgq8zajq9d8x4mia4lid7j0dyk";
|
sha256 = "053hdv6ww0q4mivajj4iyp7krfvgq8zajq9d8x4mia4lid7j0dyk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "4.07") ''
|
||||||
|
for p in functors list_of of_mutable
|
||||||
|
do
|
||||||
|
substituteInPlace src/lib/$p.ml --replace Pervasives. Stdlib.
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
|
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user