ocamlPackages.ocplib-endian: fix for OCaml >= 5

This commit is contained in:
Weijia Wang 2023-04-19 15:44:54 +03:00 committed by Vincent Laporte
parent 685b423e45
commit 3df03f233a

View File

@ -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 ];