diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-04-19 15:44:54 +0300 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2023-04-19 21:52:23 +0200 |
commit | 3df03f233a46cab99e34e79f52d62495f8522bcf (patch) | |
tree | 42e81521d1eed92d416c72f584703f40872be1b3 | |
parent | 685b423e45a7fa6500d53681e279ad9964977717 (diff) |
ocamlPackages.ocplib-endian: fix for OCaml >= 5
-rw-r--r-- | pkgs/development/ocaml-modules/ocplib-endian/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/ocaml-modules/ocplib-endian/default.nix b/pkgs/development/ocaml-modules/ocplib-endian/default.nix index 1e657fce8dd11..285e8de84b397 100644 --- a/pkgs/development/ocaml-modules/ocplib-endian/default.nix +++ b/pkgs/development/ocaml-modules/ocplib-endian/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchFromGitHub, cppo }: +{ lib, buildDunePackage, fetchFromGitHub, ocaml, cppo }: buildDunePackage rec { version = "1.2"; @@ -11,6 +11,11 @@ buildDunePackage rec { sha256 = "sha256-THTlhOfXAPaqTt1qBkht+D67bw6M175QLvXoUMgjks4="; }; + postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "5.0") '' + substituteInPlace src/dune \ + --replace "libraries ocplib_endian bigarray" "libraries ocplib_endian" + ''; + minimalOCamlVersion = "4.03"; nativeBuildInputs = [ cppo ]; |