mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
ocamlPackages.sosa: fix for OCaml ≥ 5.0
This commit is contained in:
parent
cba62cad70
commit
5bd5a25808
@ -2,9 +2,8 @@
|
||||
, findlib, ocaml, ocamlbuild
|
||||
}:
|
||||
|
||||
if lib.versionOlder ocaml.version "4.02"
|
||||
then throw "sosa is not available for OCaml ${ocaml.version}"
|
||||
else
|
||||
lib.throwIf (lib.versionOlder ocaml.version "4.02")
|
||||
"sosa is not available for OCaml ${ocaml.version}"
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ocaml${ocaml.version}-sosa";
|
||||
@ -17,6 +16,13 @@ stdenv.mkDerivation rec {
|
||||
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 ];
|
||||
|
||||
strictDeps = true;
|
||||
|
Loading…
Reference in New Issue
Block a user