Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocamlPackages tree-wide: Move buildInputs that should be nativeBuildInputs #161344

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions pkgs/applications/science/logic/alt-ergo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,33 @@ let
};

useDune2 = true;

nativeBuildInputs = [ which ];

in

let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
pname = "alt-ergo-lib";
inherit version src useDune2 nativeBuildInputs;
inherit version src useDune2;
configureFlags = pname;
nativeBuildInputs = [ which ];
buildInputs = with ocamlPackages; [ dune-configurator ];
propagatedBuildInputs = with ocamlPackages; [ num ocplib-simplex stdlib-shims zarith ];
}; in

let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
pname = "alt-ergo-parsers";
inherit version src useDune2 nativeBuildInputs;
inherit version src useDune2;
configureFlags = pname;
buildInputs = with ocamlPackages; [ menhir ];
nativeBuildInputs = [ which ocamlPackages.menhir ];
propagatedBuildInputs = [ alt-ergo-lib ] ++ (with ocamlPackages; [ camlzip psmt2-frontend ]);
}; in

ocamlPackages.buildDunePackage {

inherit pname version src useDune2 nativeBuildInputs;
inherit pname version src useDune2;

configureFlags = pname;

buildInputs = [ alt-ergo-parsers ] ++ (with ocamlPackages; [
cmdliner menhir ])
;
nativeBuildInputs = [ which ocamlPackages.menhir ];
buildInputs = [ alt-ergo-parsers ocamlPackages.cmdliner ];

meta = {
description = "High-performance theorem prover and SMT solver";
Expand Down
5 changes: 4 additions & 1 deletion pkgs/applications/science/logic/anders/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ ocamlPackages.buildDunePackage rec {
sha256 = "sha256-JUiZoo2rNLfgs94TlJqUNzul/7ODisCjSFAzhgSp1z4=";
};

buildInputs = with ocamlPackages; [ zarith menhir ];
strictDeps = true;

nativeBuildInputs = [ ocamlPackages.menhir ];
buildInputs = [ ocamlPackages.zarith ];

meta = with lib; {
description = "Modal Homotopy Type System";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/build-support/ocaml/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ stdenv.mkDerivation (args // {

nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ] ++ nativeBuildInputs;

strictDeps = true;

setupHook = if setupHook == null && hasSharedObjects
then writeText "setupHook.sh" ''
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${pname}/"
Expand Down
6 changes: 4 additions & 2 deletions pkgs/build-support/ocaml/oasis.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:

{ pname, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
{ pname, version, nativeBuildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
minimumOCamlVersion ? null,
createFindlibDestdir ? true,
dontStrip ? true,
Expand All @@ -15,11 +15,13 @@ else
stdenv.mkDerivation (args // {
name = "ocaml${ocaml.version}-${pname}-${version}";

buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ buildInputs;
nativeBuildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ nativeBuildInputs;

inherit createFindlibDestdir;
inherit dontStrip;

strictDeps = true;

buildPhase = ''
runHook preBuild
oasis setup
Expand Down
14 changes: 10 additions & 4 deletions pkgs/development/compilers/fstar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,26 @@ stdenv.mkDerivation rec {
sha256 = "sha256-bK3McF/wTjT9q6luihPaEXjx7Lu6+ZbQ9G61Mc4KoB0=";
};

nativeBuildInputs = [ makeWrapper installShellFiles ];
strictDeps = true;

buildInputs = [
z3
nativeBuildInputs = [
makeWrapper
installShellFiles
] ++ (with ocamlPackages; [
ocaml
findlib
ocamlbuild
menhir
]);

buildInputs = [
z3
] ++ (with ocamlPackages; [
batteries
zarith
stdint
yojson
fileutils
menhir
menhirLib
pprint
sedlex_2
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/libbap/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ stdenv.mkDerivation {
--replace "-linkpkg" "-thread -linkpkg"
'';

nativeBuildInputs = [ autoreconfHook which ];
buildInputs = [ ocaml bap findlib ctypes ];
nativeBuildInputs = [ autoreconfHook which ocaml findlib ];
buildInputs = [ bap ctypes ];

preInstall = ''
mkdir -p $out/lib
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/ocaml-modules/apron/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ stdenv.mkDerivation rec {
sha256 = "14ymjahqdxj26da8wik9d5dzlxn81b3z1iggdl7rn2nn06jy7lvy";
};

buildInputs = [ perl gmp mpfr ppl ocaml findlib camlidl ];
nativeBuildInputs = [ ocaml findlib perl ];
buildInputs = [ gmp mpfr ppl camlidl ];
propagatedBuildInputs = [ mlgmpidl ];

strictDeps = true;

outputs = [ "out" "bin" "dev" ];

configurePhase = ''
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/ocaml-modules/astring/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ stdenv.mkDerivation {
inherit (param) sha256;
};

buildInputs = [ ocaml findlib ocamlbuild topkg ];
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
buildInputs = [ topkg ];

strictDeps = true;

inherit (topkg) buildPhase installPhase;

Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/ocaml-modules/atd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ buildDunePackage rec {
sha256 = "17jm79np69ixp53a4njxnlb1pg8sd1g47nm3nyki9clkc8d4qsyv";
};

buildInputs = [ which menhir ];
nativeBuildInputs = [ which menhir ];
propagatedBuildInputs = [ easy-format re ];

strictDeps = true;

doCheck = true;

passthru.tests = {
Expand Down
5 changes: 2 additions & 3 deletions pkgs/development/ocaml-modules/bap/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ stdenv.mkDerivation rec {
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/ocaml${ocaml.version}-bap-${version}-llvm-plugins/"
'';

nativeBuildInputs = [ which makeWrapper ];
nativeBuildInputs = [ which makeWrapper ocaml findlib ocamlbuild ocaml_oasis ];

buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis
linenoise
buildInputs = [ linenoise
ounit
ppx_bitstring
z3
Expand Down
8 changes: 5 additions & 3 deletions pkgs/development/ocaml-modules/batteries/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, num
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, num, ounit
, doCheck ? lib.versionAtLeast ocaml.version "4.08" && !stdenv.isAarch64
}:

Expand All @@ -17,10 +17,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256:1cd7475n1mxhq482aidmhh27mq5p2vmb8d9fkb1mlza9pz5z66yq";
};

buildInputs = [ ocaml findlib ocamlbuild ];
checkInputs = [ qtest ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
checkInputs = [ qtest ounit ];
propagatedBuildInputs = [ num ];

strictDeps = !doCheck;

inherit doCheck;
checkTarget = "test";

Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/ocaml-modules/benchmark/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "16wi8ld7c3mq77ylpgbnj8qqqqimyzwxs47v06vyrwpma5pab5xa";
};

buildInputs = [ ocaml findlib ocamlbuild ocaml_pcre ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ ocaml_pcre ];

strictDeps = true;

createFindlibDestdir = true;

Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/ocaml-modules/bigarray-overlap/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ buildDunePackage rec {
minimumOCamlVersion = "4.07";
useDune2 = true;

strictDeps = !doCheck;

propagatedBuildInputs = [ bigarray-compat ];

checkInputs = [ alcotest astring fpath bos findlib pkg-config ];
nativeBuildInputs = [ findlib pkg-config ];
checkInputs = [ alcotest astring fpath bos ];
doCheck = true;

meta = with lib; {
Expand Down
6 changes: 5 additions & 1 deletion pkgs/development/ocaml-modules/bigstringaf/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, buildDunePackage, ocaml, alcotest, bigarray-compat }:
{ lib, fetchFromGitHub, buildDunePackage, ocaml, alcotest, bigarray-compat, pkg-config }:

buildDunePackage rec {
pname = "bigstringaf";
Expand All @@ -15,6 +15,10 @@ buildDunePackage rec {
sha256 = "1q1sqxzdnlrpl95ccrhl7lwy3zswgd9rbn19ildclh0lyi2vazbj";
};

# This currently fails with dune
strictDeps = false;

nativeBuildInputs = [ pkg-config ];
checkInputs = [ alcotest ];
propagatedBuildInputs = [ bigarray-compat ];
doCheck = lib.versionAtLeast ocaml.version "4.05";
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/ocaml-modules/biniou/1.0.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ stdenv.mkDerivation rec {
sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb";
};

buildInputs = [ ocaml findlib easy-format ];
nativeBuildInputs = [ ocaml findlib ];
buildInputs = [ easy-format ];

strictDeps = true;

createFindlibDestdir = true;

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/ocaml-modules/biniou/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ buildDunePackage rec {

propagatedBuildInputs = [ easy-format ];

strictDeps = true;

postPatch = ''
patchShebangs .
'';
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/ocaml-modules/bitv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256-sZwq6c10hBBS9tGvKlWD9GE3JBrZPByfDrXE6xIPcG4=";
};

buildInputs = [ autoreconfHook which ocaml findlib ];
nativeBuildInputs = [ autoreconfHook which ocaml findlib ];

strictDeps = true;

createFindlibDestdir = true;

Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/ocaml-modules/bolt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ stdenv.mkDerivation rec {
sha256 = "1c807wrpxra9sbb34lajhimwra28ldxv04m570567lh2b04n38zy";
};

buildInputs = [ ocaml findlib ocamlbuild which camlp4 ];
nativeBuildInputs = [ ocaml findlib ocamlbuild which camlp4 ];

strictDeps = true;

patches = [
(fetchpatch {
Expand Down
6 changes: 4 additions & 2 deletions pkgs/development/ocaml-modules/bos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ stdenv.mkDerivation rec {
sha256 = "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc";
};

nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg ];
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
buildInputs = [ topkg ];
propagatedBuildInputs = [ astring fmt fpath logs rresult ];

strictDeps = true;

inherit (topkg) buildPhase installPhase;

meta = {
Expand Down
5 changes: 2 additions & 3 deletions pkgs/development/ocaml-modules/bz2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [
autoreconfHook
];

buildInputs = [
ocaml
findlib
];
Expand All @@ -30,6 +27,8 @@ stdenv.mkDerivation rec {
bzip2
];

strictDeps = true;

preInstall = "mkdir -p $OCAMLFIND_DESTDIR/stublibs";

meta = with lib; {
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/ocaml-modules/calendar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
sha256 = "04pvhwb664g3s644c7v7419a3kvf5s3pynkhmk5j59dvlfm1yf0f";
};

buildInputs = [ ocaml findlib ];
nativeBuildInputs = [ ocaml findlib ];

strictDeps = true;

createFindlibDestdir = true;

Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/ocaml-modules/camlimages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ buildDunePackage rec {
sha256 = "1m2c76ghisg73dikz2ifdkrbkgiwa0hcmp21f2fm2rkbf02rq3f4";
};

buildInputs = [ dune-configurator cppo graphics lablgtk stdio ];
strictDeps = true;

nativeBuildInputs = [ cppo ];
buildInputs = [ dune-configurator graphics lablgtk stdio ];

meta = with lib; {
branch = "5.0";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/ocaml-modules/camlpdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256:1qmsa0xgi960y7r20mvf8hxiiml7l1908s4dm7nq262f19w51gsl";
};

buildInputs = [ which ocaml findlib ];
nativeBuildInputs = [ which ocaml findlib ];

strictDeps = true;

preInstall = ''
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/ocaml-modules/camlzip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ stdenv.mkDerivation {
inherit (param) sha256;
};

buildInputs = [ ocaml findlib ];
nativeBuildInputs = [ ocaml findlib ];

propagatedBuildInputs = [zlib];

strictDeps = true;

inherit (param) patches;

createFindlibDestdir = true;
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/ocaml-modules/camomile/0.8.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ stdenv.mkDerivation rec {
sha256 = "0x43pjxx70kgip86mmdn08s97k4qzdqc8i79xfyyx28smy1bsa00";
};

buildInputs = [ocaml findlib camlp4];
nativeBuildInputs = [ ocaml findlib camlp4 ];

strictDeps = true;

createFindlibDestdir = true;

Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/ocaml-modules/camomile/0.8.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ stdenv.mkDerivation {
sha256 = "167279lia6qx62mdcyc5rjsi4gf4yi52wn9mhgd9y1v3754z7fwb";
})];

buildInputs = [ocaml findlib camlp4];
nativeBuildInputs = [ocaml findlib camlp4 ];

strictDeps = true;

createFindlibDestdir = true;

Expand Down
Loading