From efd2a1bb8d143bf28162ee775bfe3e35333984d9 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Sun, 7 Nov 2021 22:10:02 -0800 Subject: [PATCH 1/3] ocamlPackages: fix some packages for cross-compilation --- pkgs/development/ocaml-modules/afl-persistent/default.nix | 2 +- pkgs/development/ocaml-modules/lwt/default.nix | 4 ++-- pkgs/development/ocaml-modules/ocplib-endian/default.nix | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/afl-persistent/default.nix b/pkgs/development/ocaml-modules/afl-persistent/default.nix index 5625cd95764f..ba266ade830e 100644 --- a/pkgs/development/ocaml-modules/afl-persistent/default.nix +++ b/pkgs/development/ocaml-modules/afl-persistent/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; # don't run tests in buildPhase # don't overwrite test binary diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix index 7d6424564d2f..4798cfe69c27 100644 --- a/pkgs/development/ocaml-modules/lwt/default.nix +++ b/pkgs/development/ocaml-modules/lwt/default.nix @@ -17,8 +17,8 @@ buildDunePackage rec { sha256 = "0cq2qy23sa1a5zk6nja3c652mp29i84yfrkcwks6i8sdqwli36jy"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ cppo dune-configurator ] + nativeBuildInputs = [ pkg-config cppo dune-configurator ]; + buildInputs = [ ] ++ optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims ++ optional (!versionAtLeast ocaml.version "4.07") ncurses; propagatedBuildInputs = [ libev mmap ocplib-endian seq result ]; diff --git a/pkgs/development/ocaml-modules/ocplib-endian/default.nix b/pkgs/development/ocaml-modules/ocplib-endian/default.nix index 2cb066a7c035..f2cf4acbf27b 100644 --- a/pkgs/development/ocaml-modules/ocplib-endian/default.nix +++ b/pkgs/development/ocaml-modules/ocplib-endian/default.nix @@ -11,7 +11,7 @@ buildDunePackage rec { useDune2 = true; - buildInputs = [ cppo ]; + nativeBuildInputs = [ cppo ]; meta = with lib; { description = "Optimised functions to read and write int16/32/64"; From ceebd60ceffb15ef995d032b06c37f1b9daf7fd7 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 8 Nov 2021 09:45:07 -0800 Subject: [PATCH 2/3] Update pkgs/development/ocaml-modules/lwt/default.nix Co-authored-by: Sandro --- pkgs/development/ocaml-modules/lwt/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix index 4798cfe69c27..be15d2b72a54 100644 --- a/pkgs/development/ocaml-modules/lwt/default.nix +++ b/pkgs/development/ocaml-modules/lwt/default.nix @@ -18,8 +18,7 @@ buildDunePackage rec { }; nativeBuildInputs = [ pkg-config cppo dune-configurator ]; - buildInputs = [ ] - ++ optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims + buildInputs = optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims ++ optional (!versionAtLeast ocaml.version "4.07") ncurses; propagatedBuildInputs = [ libev mmap ocplib-endian seq result ]; From 7e507c5fa8d7c7ad258f5c9a90c80d52b7046ea0 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 8 Nov 2021 09:59:05 -0800 Subject: [PATCH 3/3] fix buildinputs for mrmime --- pkgs/development/ocaml-modules/mrmime/default.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/development/ocaml-modules/mrmime/default.nix b/pkgs/development/ocaml-modules/mrmime/default.nix index 6d3663509bc1..a5c2a68ee47b 100644 --- a/pkgs/development/ocaml-modules/mrmime/default.nix +++ b/pkgs/development/ocaml-modules/mrmime/default.nix @@ -36,15 +36,6 @@ buildDunePackage rec { useDune2 = true; - buildInputs = [ - afl-persistent - bigarray-compat - bigarray-overlap - bigstringaf - fpath - mirage-crypto-rng - ]; - propagatedBuildInputs = [ angstrom base64 @@ -59,6 +50,12 @@ buildDunePackage rec { rresult unstrctrd uutf + afl-persistent + bigarray-compat + bigarray-overlap + bigstringaf + fpath + mirage-crypto-rng ]; checkInputs = [