From a13cdfe520d87db401dd000fbd67cad728162a60 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Tue, 22 Feb 2022 10:59:04 +0100 Subject: [PATCH] ocamlPackages tree-wide: Move buildInputs that should be nativeBuildInputs To keep this for the future we also strictDeps where possible, including for janePackages, topkg, oasis and ocamlbuild. This makes some closures significantly smaller and makes cross compilation easier --- .../science/logic/alt-ergo/default.nix | 17 +++++++---------- .../science/logic/anders/default.nix | 5 ++++- pkgs/build-support/ocaml/default.nix | 2 ++ pkgs/build-support/ocaml/oasis.nix | 6 ++++-- pkgs/development/compilers/fstar/default.nix | 14 ++++++++++---- pkgs/development/libraries/libbap/default.nix | 4 ++-- .../development/ocaml-modules/apron/default.nix | 5 ++++- .../ocaml-modules/astring/default.nix | 5 ++++- pkgs/development/ocaml-modules/atd/default.nix | 4 +++- pkgs/development/ocaml-modules/bap/default.nix | 5 ++--- .../ocaml-modules/batteries/default.nix | 8 +++++--- .../ocaml-modules/benchmark/default.nix | 5 ++++- .../ocaml-modules/bigarray-overlap/default.nix | 5 ++++- .../ocaml-modules/bigstringaf/default.nix | 6 +++++- pkgs/development/ocaml-modules/biniou/1.0.nix | 5 ++++- .../ocaml-modules/biniou/default.nix | 2 ++ pkgs/development/ocaml-modules/bitv/default.nix | 4 +++- pkgs/development/ocaml-modules/bolt/default.nix | 4 +++- pkgs/development/ocaml-modules/bos/default.nix | 6 ++++-- pkgs/development/ocaml-modules/bz2/default.nix | 5 ++--- .../ocaml-modules/calendar/default.nix | 4 +++- .../ocaml-modules/camlimages/default.nix | 5 ++++- .../ocaml-modules/camlpdf/default.nix | 4 +++- .../ocaml-modules/camlzip/default.nix | 4 +++- .../ocaml-modules/camomile/0.8.2.nix | 4 +++- .../ocaml-modules/camomile/0.8.5.nix | 4 +++- .../ocaml-modules/camomile/default.nix | 4 +++- .../development/ocaml-modules/caqti/default.nix | 2 +- .../ocaml-modules/carton/default.nix | 4 +++- .../ocaml-modules/cfstream/default.nix | 5 ++++- .../ocaml-modules/checkseum/default.nix | 6 ++---- pkgs/development/ocaml-modules/cil/default.nix | 4 +++- .../ocaml-modules/cmdliner/default.nix | 2 +- pkgs/development/ocaml-modules/coin/default.nix | 6 ++++-- .../ocaml-modules/comparelib/default.nix | 3 ++- .../ocaml-modules/config-file/default.nix | 4 +++- pkgs/development/ocaml-modules/cpdf/default.nix | 5 ++++- .../ocaml-modules/cryptgps/default.nix | 4 +++- pkgs/development/ocaml-modules/csv/1.5.nix | 4 +++- .../ocaml-modules/ctypes/default.nix | 6 ++++-- .../ocaml-modules/digestif/default.nix | 6 ++++++ .../ocaml-modules/dolmen/default.nix | 4 +++- .../development/ocaml-modules/dolog/default.nix | 4 +++- pkgs/development/ocaml-modules/dum/default.nix | 4 +++- .../ocaml-modules/dypgen/default.nix | 4 +++- .../development/ocaml-modules/elina/default.nix | 4 +++- .../development/ocaml-modules/eliom/default.nix | 10 ++++++++-- .../ocaml-modules/enumerate/default.nix | 4 +++- .../ocaml-modules/erm_xml/default.nix | 4 +++- .../ocaml-modules/erm_xmpp/default.nix | 5 ++++- pkgs/development/ocaml-modules/expat/0.9.nix | 5 ++++- .../development/ocaml-modules/expat/default.nix | 5 ++++- .../ocaml-modules/extlib/default.nix | 4 +++- .../ocaml-modules/farfadet/default.nix | 5 ++++- pkgs/development/ocaml-modules/fmt/default.nix | 8 +++++--- .../ocaml-modules/fontconfig/default.nix | 7 +++++-- .../development/ocaml-modules/fpath/default.nix | 5 ++++- .../ocaml-modules/frontc/default.nix | 4 +++- .../ocaml-modules/functory/default.nix | 4 +++- .../ocaml-modules/getopt/default.nix | 4 +++- pkgs/development/ocaml-modules/gg/default.nix | 3 ++- .../ocaml-modules/gmetadom/default.nix | 7 ++++--- .../ocaml-modules/hacl-star/default.nix | 4 +++- .../development/ocaml-modules/hacl-star/raw.nix | 4 +++- .../ocaml-modules/herelib/default.nix | 6 +++++- .../ocaml-modules/hidapi/default.nix | 5 ++++- pkgs/development/ocaml-modules/hmap/default.nix | 5 ++++- pkgs/development/ocaml-modules/hxd/default.nix | 5 +---- .../ocaml-modules/inifiles/default.nix | 4 +++- .../ocaml-modules/inotify/default.nix | 6 +++++- .../ocaml-modules/iso8601/default.nix | 5 ++++- .../ocaml-modules/janestreet/0.12.nix | 1 + .../ocaml-modules/janestreet/0.14.nix | 4 ++++ .../ocaml-modules/janestreet/janePackage.nix | 6 ++++-- .../janestreet/janePackage_0_12.nix | 8 ++++++-- .../janestreet/janePackage_0_14.nix | 4 +++- .../ocaml-modules/javalib/default.nix | 4 +++- .../development/ocaml-modules/jsonm/default.nix | 6 ++++-- .../ocaml-modules/lablgl/default.nix | 3 ++- .../ocaml-modules/lablgtk-extras/1.4.nix | 2 +- .../ocaml-modules/lablgtk-extras/default.nix | 2 +- .../ocaml-modules/lablgtk/2.14.0.nix | 4 ++-- .../ocaml-modules/lablgtk/default.nix | 4 ++-- .../ocaml-modules/labltk/default.nix | 3 ++- pkgs/development/ocaml-modules/llvm/default.nix | 6 ++++-- pkgs/development/ocaml-modules/logs/default.nix | 6 ++++-- .../ocaml-modules/lua-ml/default.nix | 5 +++-- .../ocaml-modules/lwt-exit/default.nix | 3 ++- pkgs/development/ocaml-modules/lwt/default.nix | 9 ++++++--- .../ocaml-modules/macaque/default.nix | 6 ++++-- .../ocaml-modules/magick/default.nix | 6 ++++-- .../ocaml-modules/merlin-extend/default.nix | 4 +++- .../ocaml-modules/mirage-crypto/default.nix | 5 ++++- .../ocaml-modules/mirage-crypto/ec.nix | 13 ++++++++----- .../ocaml-modules/mirage-crypto/pk.nix | 4 +++- .../ocaml-modules/mirage-crypto/rng-async.nix | 4 +++- .../ocaml-modules/mirage-crypto/rng-mirage.nix | 4 +++- .../ocaml-modules/mirage-crypto/rng.nix | 6 ++++-- .../development/ocaml-modules/mlgmp/default.nix | 5 ++++- .../ocaml-modules/mlgmpidl/default.nix | 7 +++++-- .../development/ocaml-modules/mtime/default.nix | 7 ++++--- .../development/ocaml-modules/mysql/default.nix | 4 +++- .../ocaml-modules/nocrypto/default.nix | 4 +++- .../development/ocaml-modules/notty/default.nix | 5 ++++- pkgs/development/ocaml-modules/num/default.nix | 4 ++-- .../ocaml-modules/ocaml-cairo/default.nix | 5 ++--- .../ocaml-modules/ocaml-libvirt/default.nix | 4 ++-- .../ocaml-modules/ocaml-r/default.nix | 6 +++++- .../ocaml-modules/ocamlfuse/default.nix | 7 ++++++- .../ocaml-modules/ocamlnat/default.nix | 5 ++++- .../ocaml-modules/ocamlnet/default.nix | 6 ++++-- .../ocaml-modules/ocamlsdl/default.nix | 4 ++-- .../ocaml-modules/ocb-stubblr/default.nix | 5 ++++- .../ocaml-modules/ocp-ocamlres/default.nix | 6 +++++- .../ocaml-modules/ocplib-simplex/default.nix | 5 +++-- .../ocaml-modules/ocsigen-deriving/default.nix | 5 ++++- .../ocaml-modules/ocsigen-start/default.nix | 6 ++++-- .../ocaml-modules/ocsigen-toolkit/default.nix | 4 +++- .../development/ocaml-modules/ocurl/default.nix | 6 +++++- .../development/ocaml-modules/odate/default.nix | 4 +++- pkgs/development/ocaml-modules/odn/default.nix | 5 ++++- pkgs/development/ocaml-modules/omd/default.nix | 4 +++- .../ocaml-modules/opam-repository/default.nix | 5 +++-- pkgs/development/ocaml-modules/otfm/default.nix | 5 ++++- .../development/ocaml-modules/otoml/default.nix | 4 +++- .../development/ocaml-modules/ounit/default.nix | 4 +++- .../ocaml-modules/pipebang/default.nix | 6 +++++- .../ocaml-modules/piqi-ocaml/default.nix | 5 ++++- pkgs/development/ocaml-modules/piqi/default.nix | 4 +++- .../ocaml-modules/ppx_cstubs/default.nix | 7 ++++++- .../ocaml-modules/ppx_deriving/default.nix | 10 +++++++--- .../ocaml-modules/ppx_tools/default.nix | 8 ++++++-- .../ocaml-modules/psmt2-frontend/default.nix | 4 +++- .../development/ocaml-modules/ptime/default.nix | 7 ++++--- .../development/ocaml-modules/ptmap/default.nix | 5 +++-- pkgs/development/ocaml-modules/pyml/default.nix | 6 +++++- .../development/ocaml-modules/react/default.nix | 5 ++++- .../ocaml-modules/reactivedata/default.nix | 4 +++- .../ocaml-modules/reason-native/cli.nix | 5 ++++- .../ocaml-modules/reason-native/console.nix | 2 +- .../ocaml-modules/reason-native/dir.nix | 2 +- .../reason-native/file-context-printer.nix | 2 +- .../ocaml-modules/reason-native/fp.nix | 2 +- .../reason-native/pastel-console.nix | 2 +- .../ocaml-modules/reason-native/pastel.nix | 2 +- .../ocaml-modules/reason-native/qcheck-rely.nix | 2 +- .../ocaml-modules/reason-native/refmterr.nix | 2 +- .../reason-native/rely-junit-reporter.nix | 5 ++++- .../ocaml-modules/reason-native/rely.nix | 2 +- pkgs/development/ocaml-modules/rope/default.nix | 9 ++++++--- .../ocaml-modules/rresult/default.nix | 5 ++++- .../development/ocaml-modules/sawja/default.nix | 4 ++-- .../ocaml-modules/sedlex/default.nix | 4 +++- pkgs/development/ocaml-modules/sha/default.nix | 4 +++- .../ocaml-modules/sodium/default.nix | 4 +++- pkgs/development/ocaml-modules/sosa/default.nix | 4 +++- .../ocaml-modules/sqlite3EZ/default.nix | 5 ++++- .../ocaml-modules/stdcompat/default.nix | 5 ++++- .../ocaml-modules/tezos/legacy-store.nix | 4 +++- pkgs/development/ocaml-modules/tezos/lmdb.nix | 4 +++- .../tezos/protocol-010-PtGRANAD.nix | 9 ++++++++- .../tezos/protocol-011-PtHangz2.nix | 9 ++++++++- pkgs/development/ocaml-modules/tezos/store.nix | 4 +++- .../ocaml-modules/tezos/validation.nix | 4 +++- pkgs/development/ocaml-modules/toml/default.nix | 2 +- .../development/ocaml-modules/topkg/default.nix | 2 ++ pkgs/development/ocaml-modules/tsdl/default.nix | 4 ++-- pkgs/development/ocaml-modules/twt/default.nix | 4 +++- .../ocaml-modules/type_conv/108.08.00.nix | 5 ++++- .../ocaml-modules/type_conv/109.60.01.nix | 5 ++++- .../ocaml-modules/type_conv/112.01.01.nix | 6 +++++- .../development/ocaml-modules/uchar/default.nix | 4 +++- pkgs/development/ocaml-modules/ulex/default.nix | 5 +++-- pkgs/development/ocaml-modules/uucd/default.nix | 5 ++++- pkgs/development/ocaml-modules/uucp/default.nix | 5 ++++- .../development/ocaml-modules/uuidm/default.nix | 2 +- pkgs/development/ocaml-modules/uunf/default.nix | 5 ++++- .../development/ocaml-modules/uuseg/default.nix | 5 ++++- pkgs/development/ocaml-modules/uutf/default.nix | 6 ++++-- pkgs/development/ocaml-modules/uuuu/default.nix | 4 +++- pkgs/development/ocaml-modules/vg/default.nix | 5 ++++- .../ocaml-modules/webbrowser/default.nix | 4 +++- .../ocaml-modules/xml-light/default.nix | 4 +++- pkgs/development/ocaml-modules/xmlm/default.nix | 5 ++++- pkgs/development/ocaml-modules/z3/default.nix | 4 +++- .../development/tools/ocaml/camlidl/default.nix | 2 +- pkgs/development/tools/ocaml/merlin/4.x.nix | 14 ++++++++------ pkgs/development/tools/ocaml/merlin/default.nix | 6 ++++-- pkgs/development/tools/ocaml/oasis/default.nix | 6 +++++- .../development/tools/ocaml/obelisk/default.nix | 7 +++++-- .../tools/ocaml/ocamlformat/generic.nix | 12 ++++++------ .../tools/ocaml/ocp-index/default.nix | 5 ++++- pkgs/development/tools/ocaml/utop/default.nix | 3 +-- pkgs/top-level/all-packages.nix | 2 +- 194 files changed, 676 insertions(+), 277 deletions(-) diff --git a/pkgs/applications/science/logic/alt-ergo/default.nix b/pkgs/applications/science/logic/alt-ergo/default.nix index 837f25e320f7..096a648b4ddf 100644 --- a/pkgs/applications/science/logic/alt-ergo/default.nix +++ b/pkgs/applications/science/logic/alt-ergo/default.nix @@ -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"; diff --git a/pkgs/applications/science/logic/anders/default.nix b/pkgs/applications/science/logic/anders/default.nix index 72e412fc3bdc..bb60b2b8321a 100644 --- a/pkgs/applications/science/logic/anders/default.nix +++ b/pkgs/applications/science/logic/anders/default.nix @@ -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"; diff --git a/pkgs/build-support/ocaml/default.nix b/pkgs/build-support/ocaml/default.nix index 1fe99bb6320e..38029e8a4800 100644 --- a/pkgs/build-support/ocaml/default.nix +++ b/pkgs/build-support/ocaml/default.nix @@ -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}/" diff --git a/pkgs/build-support/ocaml/oasis.nix b/pkgs/build-support/ocaml/oasis.nix index ee231a6e258c..8f81344daf09 100644 --- a/pkgs/build-support/ocaml/oasis.nix +++ b/pkgs/build-support/ocaml/oasis.nix @@ -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, @@ -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 diff --git a/pkgs/development/compilers/fstar/default.nix b/pkgs/development/compilers/fstar/default.nix index 25abd7949071..fc0f50d0797f 100644 --- a/pkgs/development/compilers/fstar/default.nix +++ b/pkgs/development/compilers/fstar/default.nix @@ -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 diff --git a/pkgs/development/libraries/libbap/default.nix b/pkgs/development/libraries/libbap/default.nix index c15de88f6a76..0b378c583ad1 100644 --- a/pkgs/development/libraries/libbap/default.nix +++ b/pkgs/development/libraries/libbap/default.nix @@ -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 diff --git a/pkgs/development/ocaml-modules/apron/default.nix b/pkgs/development/ocaml-modules/apron/default.nix index c9edfd62e06d..9a072482d328 100644 --- a/pkgs/development/ocaml-modules/apron/default.nix +++ b/pkgs/development/ocaml-modules/apron/default.nix @@ -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 = '' diff --git a/pkgs/development/ocaml-modules/astring/default.nix b/pkgs/development/ocaml-modules/astring/default.nix index 8ecac1c124d6..f7478f93b91c 100644 --- a/pkgs/development/ocaml-modules/astring/default.nix +++ b/pkgs/development/ocaml-modules/astring/default.nix @@ -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; diff --git a/pkgs/development/ocaml-modules/atd/default.nix b/pkgs/development/ocaml-modules/atd/default.nix index de6ade61518a..7468900e07e6 100644 --- a/pkgs/development/ocaml-modules/atd/default.nix +++ b/pkgs/development/ocaml-modules/atd/default.nix @@ -13,9 +13,11 @@ buildDunePackage rec { sha256 = "17jm79np69ixp53a4njxnlb1pg8sd1g47nm3nyki9clkc8d4qsyv"; }; - buildInputs = [ which menhir ]; + nativeBuildInputs = [ which menhir ]; propagatedBuildInputs = [ easy-format re ]; + strictDeps = true; + doCheck = true; passthru.tests = { diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix index f8e07fd1265c..ea009083e8d1 100644 --- a/pkgs/development/ocaml-modules/bap/default.nix +++ b/pkgs/development/ocaml-modules/bap/default.nix @@ -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 diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix index 69e8289df2cd..184f10a52be4 100644 --- a/pkgs/development/ocaml-modules/batteries/default.nix +++ b/pkgs/development/ocaml-modules/batteries/default.nix @@ -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 }: @@ -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"; diff --git a/pkgs/development/ocaml-modules/benchmark/default.nix b/pkgs/development/ocaml-modules/benchmark/default.nix index 3397821319e3..c80162307241 100644 --- a/pkgs/development/ocaml-modules/benchmark/default.nix +++ b/pkgs/development/ocaml-modules/benchmark/default.nix @@ -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; diff --git a/pkgs/development/ocaml-modules/bigarray-overlap/default.nix b/pkgs/development/ocaml-modules/bigarray-overlap/default.nix index e02b1159a9c7..a5f5ae33ede7 100644 --- a/pkgs/development/ocaml-modules/bigarray-overlap/default.nix +++ b/pkgs/development/ocaml-modules/bigarray-overlap/default.nix @@ -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; { diff --git a/pkgs/development/ocaml-modules/bigstringaf/default.nix b/pkgs/development/ocaml-modules/bigstringaf/default.nix index 852459c2bac1..e8d36526d228 100644 --- a/pkgs/development/ocaml-modules/bigstringaf/default.nix +++ b/pkgs/development/ocaml-modules/bigstringaf/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildDunePackage, ocaml, alcotest, bigarray-compat }: +{ lib, fetchFromGitHub, buildDunePackage, ocaml, alcotest, bigarray-compat, pkg-config }: buildDunePackage rec { pname = "bigstringaf"; @@ -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"; diff --git a/pkgs/development/ocaml-modules/biniou/1.0.nix b/pkgs/development/ocaml-modules/biniou/1.0.nix index 795e63401290..5a2e2ea9a7fa 100644 --- a/pkgs/development/ocaml-modules/biniou/1.0.nix +++ b/pkgs/development/ocaml-modules/biniou/1.0.nix @@ -16,7 +16,10 @@ stdenv.mkDerivation rec { sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb"; }; - buildInputs = [ ocaml findlib easy-format ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ easy-format ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/biniou/default.nix b/pkgs/development/ocaml-modules/biniou/default.nix index 535b34b03dcd..75725f135518 100644 --- a/pkgs/development/ocaml-modules/biniou/default.nix +++ b/pkgs/development/ocaml-modules/biniou/default.nix @@ -15,6 +15,8 @@ buildDunePackage rec { propagatedBuildInputs = [ easy-format ]; + strictDeps = true; + postPatch = '' patchShebangs . ''; diff --git a/pkgs/development/ocaml-modules/bitv/default.nix b/pkgs/development/ocaml-modules/bitv/default.nix index 2ac3a0ba3e76..07649f3655b8 100644 --- a/pkgs/development/ocaml-modules/bitv/default.nix +++ b/pkgs/development/ocaml-modules/bitv/default.nix @@ -15,7 +15,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-sZwq6c10hBBS9tGvKlWD9GE3JBrZPByfDrXE6xIPcG4="; }; - buildInputs = [ autoreconfHook which ocaml findlib ]; + nativeBuildInputs = [ autoreconfHook which ocaml findlib ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/bolt/default.nix b/pkgs/development/ocaml-modules/bolt/default.nix index a6b63676e775..46e3b6f16cce 100644 --- a/pkgs/development/ocaml-modules/bolt/default.nix +++ b/pkgs/development/ocaml-modules/bolt/default.nix @@ -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 { diff --git a/pkgs/development/ocaml-modules/bos/default.nix b/pkgs/development/ocaml-modules/bos/default.nix index 17a0185829e9..07d4d4864d82 100644 --- a/pkgs/development/ocaml-modules/bos/default.nix +++ b/pkgs/development/ocaml-modules/bos/default.nix @@ -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 = { diff --git a/pkgs/development/ocaml-modules/bz2/default.nix b/pkgs/development/ocaml-modules/bz2/default.nix index 617715fc6edc..4ac0262e1ee3 100644 --- a/pkgs/development/ocaml-modules/bz2/default.nix +++ b/pkgs/development/ocaml-modules/bz2/default.nix @@ -19,9 +19,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook - ]; - - buildInputs = [ ocaml findlib ]; @@ -30,6 +27,8 @@ stdenv.mkDerivation rec { bzip2 ]; + strictDeps = true; + preInstall = "mkdir -p $OCAMLFIND_DESTDIR/stublibs"; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/calendar/default.nix b/pkgs/development/ocaml-modules/calendar/default.nix index 29927aae04a7..4c089b76f3ed 100644 --- a/pkgs/development/ocaml-modules/calendar/default.nix +++ b/pkgs/development/ocaml-modules/calendar/default.nix @@ -9,7 +9,9 @@ stdenv.mkDerivation rec { sha256 = "04pvhwb664g3s644c7v7419a3kvf5s3pynkhmk5j59dvlfm1yf0f"; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/camlimages/default.nix b/pkgs/development/ocaml-modules/camlimages/default.nix index ba36cfa05b99..a83c7c474ac5 100644 --- a/pkgs/development/ocaml-modules/camlimages/default.nix +++ b/pkgs/development/ocaml-modules/camlimages/default.nix @@ -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"; diff --git a/pkgs/development/ocaml-modules/camlpdf/default.nix b/pkgs/development/ocaml-modules/camlpdf/default.nix index 42c27f15a5b1..06456b9c930e 100644 --- a/pkgs/development/ocaml-modules/camlpdf/default.nix +++ b/pkgs/development/ocaml-modules/camlpdf/default.nix @@ -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 diff --git a/pkgs/development/ocaml-modules/camlzip/default.nix b/pkgs/development/ocaml-modules/camlzip/default.nix index c2c2e98b2e06..8124b8d8e437 100644 --- a/pkgs/development/ocaml-modules/camlzip/default.nix +++ b/pkgs/development/ocaml-modules/camlzip/default.nix @@ -33,10 +33,12 @@ stdenv.mkDerivation { inherit (param) sha256; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; propagatedBuildInputs = [zlib]; + strictDeps = true; + inherit (param) patches; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/camomile/0.8.2.nix b/pkgs/development/ocaml-modules/camomile/0.8.2.nix index 79c7a46e6e99..43bbfe7b6a6d 100644 --- a/pkgs/development/ocaml-modules/camomile/0.8.2.nix +++ b/pkgs/development/ocaml-modules/camomile/0.8.2.nix @@ -13,7 +13,9 @@ stdenv.mkDerivation rec { sha256 = "0x43pjxx70kgip86mmdn08s97k4qzdqc8i79xfyyx28smy1bsa00"; }; - buildInputs = [ocaml findlib camlp4]; + nativeBuildInputs = [ ocaml findlib camlp4 ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/camomile/0.8.5.nix b/pkgs/development/ocaml-modules/camomile/0.8.5.nix index 67bd8b8c755d..e63953836982 100644 --- a/pkgs/development/ocaml-modules/camomile/0.8.5.nix +++ b/pkgs/development/ocaml-modules/camomile/0.8.5.nix @@ -14,7 +14,9 @@ stdenv.mkDerivation { sha256 = "167279lia6qx62mdcyc5rjsi4gf4yi52wn9mhgd9y1v3754z7fwb"; })]; - buildInputs = [ocaml findlib camlp4]; + nativeBuildInputs = [ocaml findlib camlp4 ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/camomile/default.nix b/pkgs/development/ocaml-modules/camomile/default.nix index 090b96ece0cc..a75f05b33f2e 100644 --- a/pkgs/development/ocaml-modules/camomile/default.nix +++ b/pkgs/development/ocaml-modules/camomile/default.nix @@ -13,7 +13,9 @@ buildDunePackage rec { sha256 = "00i910qjv6bpk0nkafp5fg97isqas0bwjf7m6rz11rsxilpalzad"; }; - buildInputs = [ cppo ]; + nativeBuildInputs = [ cppo ]; + + strictDeps = true; configurePhase = '' runHook preConfigure diff --git a/pkgs/development/ocaml-modules/caqti/default.nix b/pkgs/development/ocaml-modules/caqti/default.nix index 105a6a9dfe18..d9606cda1fa3 100644 --- a/pkgs/development/ocaml-modules/caqti/default.nix +++ b/pkgs/development/ocaml-modules/caqti/default.nix @@ -14,7 +14,7 @@ buildDunePackage rec { sha256 = "1vl61kdyj89whc3mh4k9bis6rbj9x2scf6hnv9afyalp4j65sqx1"; }; - buildInputs = [ cppo ]; + nativeBuildInputs = [ cppo ]; propagatedBuildInputs = [ logs ptime uri ]; meta = { diff --git a/pkgs/development/ocaml-modules/carton/default.nix b/pkgs/development/ocaml-modules/carton/default.nix index 97e00dc71b62..6868ddc7851c 100644 --- a/pkgs/development/ocaml-modules/carton/default.nix +++ b/pkgs/development/ocaml-modules/carton/default.nix @@ -48,13 +48,15 @@ buildDunePackage rec { ]; doCheck = true; + nativeBuildInputs = [ + findlib + ]; checkInputs = [ base64 alcotest alcotest-lwt crowbar lwt - findlib mirage-flow ]; diff --git a/pkgs/development/ocaml-modules/cfstream/default.nix b/pkgs/development/ocaml-modules/cfstream/default.nix index 303fdc01011d..62a29a5d4141 100644 --- a/pkgs/development/ocaml-modules/cfstream/default.nix +++ b/pkgs/development/ocaml-modules/cfstream/default.nix @@ -17,7 +17,10 @@ buildDunePackage rec { patches = [ ./git_commit.patch ]; - buildInputs = [ m4 ]; + # This currently fails with dune + strictDeps = false; + + nativeBuildInputs = [ m4 ]; checkInputs = [ ounit ]; propagatedBuildInputs = [ core_kernel ]; diff --git a/pkgs/development/ocaml-modules/checkseum/default.nix b/pkgs/development/ocaml-modules/checkseum/default.nix index 3483af1dd416..3a07707a4cd1 100644 --- a/pkgs/development/ocaml-modules/checkseum/default.nix +++ b/pkgs/development/ocaml-modules/checkseum/default.nix @@ -18,10 +18,8 @@ buildDunePackage rec { sha256 = "9cdd282ea1cfc424095d7284e39e4d0ad091de3c3f2580539d03f6966d45ccd5"; }; - nativeBuildInputs = [ - dune-configurator - pkg-config - ]; + buildInputs = [ dune-configurator ]; + nativeBuildInputs = [ pkg-config ]; propagatedBuildInputs = [ bigarray-compat optint diff --git a/pkgs/development/ocaml-modules/cil/default.nix b/pkgs/development/ocaml-modules/cil/default.nix index c5a3dcde2263..7a8a3f2e70a4 100644 --- a/pkgs/development/ocaml-modules/cil/default.nix +++ b/pkgs/development/ocaml-modules/cil/default.nix @@ -13,7 +13,9 @@ stdenv.mkDerivation rec { sha256 = "05739da0b0msx6kmdavr3y2bwi92jbh3szc35d7d8pdisa8g5dv9"; }; - buildInputs = [ perl ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ perl ocaml findlib ocamlbuild ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/cmdliner/default.nix b/pkgs/development/ocaml-modules/cmdliner/default.nix index 7e49679406ab..9536cc25290e 100644 --- a/pkgs/development/ocaml-modules/cmdliner/default.nix +++ b/pkgs/development/ocaml-modules/cmdliner/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { inherit (param) sha256; }; - nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ]; buildInputs = [ topkg ]; propagatedBuildInputs = [ result ]; diff --git a/pkgs/development/ocaml-modules/coin/default.nix b/pkgs/development/ocaml-modules/coin/default.nix index f0697a9d880b..f2e0919bdee4 100644 --- a/pkgs/development/ocaml-modules/coin/default.nix +++ b/pkgs/development/ocaml-modules/coin/default.nix @@ -24,9 +24,11 @@ buildDunePackage rec { useDune2 = true; - nativeBuildInputs = [ menhir ]; + nativeBuildInputs = [ menhir findlib ]; + buildInputs = [ re ]; + + strictDeps = true; - checkInputs = [ re ]; doCheck = true; meta = { diff --git a/pkgs/development/ocaml-modules/comparelib/default.nix b/pkgs/development/ocaml-modules/comparelib/default.nix index 1d7c314f005c..1da631d683cc 100644 --- a/pkgs/development/ocaml-modules/comparelib/default.nix +++ b/pkgs/development/ocaml-modules/comparelib/default.nix @@ -1,4 +1,4 @@ -{ lib, buildOcaml, fetchFromGitHub, type_conv }: +{ lib, buildOcaml, fetchFromGitHub, type_conv, camlp4 }: buildOcaml rec { pname = "comparelib"; @@ -13,6 +13,7 @@ buildOcaml rec { sha256 = "sha256-gtJvXAUxiIt/L9bCzS+8wHcCQ+QpBubwcjDcyN0K2MA="; }; + buildInputs = [ camlp4 ]; propagatedBuildInputs = [ type_conv ]; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/config-file/default.nix b/pkgs/development/ocaml-modules/config-file/default.nix index c408d1a392f1..b9dde0e6425f 100644 --- a/pkgs/development/ocaml-modules/config-file/default.nix +++ b/pkgs/development/ocaml-modules/config-file/default.nix @@ -9,7 +9,9 @@ stdenv.mkDerivation rec { sha256 = "1b02yxcnsjhr05ssh2br2ka4hxsjpdw34ldl3nk33wfnkwk7g67q"; }; - buildInputs = [ ocaml findlib camlp4 ]; + nativeBuildInputs = [ ocaml findlib camlp4 ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/cpdf/default.nix b/pkgs/development/ocaml-modules/cpdf/default.nix index 632430fe4f7f..3f60263736e8 100644 --- a/pkgs/development/ocaml-modules/cpdf/default.nix +++ b/pkgs/development/ocaml-modules/cpdf/default.nix @@ -15,9 +15,12 @@ stdenv.mkDerivation rec { sha256 = "sha256:1qmx229nij7g6qmiacmyy4mcgx3k9509p4slahivshqm79d6wiwl"; }; - buildInputs = [ ocaml findlib ncurses ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ ncurses ]; propagatedBuildInputs = [ camlpdf ]; + strictDeps = true; + preInstall = '' mkdir -p $OCAMLFIND_DESTDIR mkdir -p $out/bin diff --git a/pkgs/development/ocaml-modules/cryptgps/default.nix b/pkgs/development/ocaml-modules/cryptgps/default.nix index 6011c6953baa..aeaa87aaf75f 100644 --- a/pkgs/development/ocaml-modules/cryptgps/default.nix +++ b/pkgs/development/ocaml-modules/cryptgps/default.nix @@ -13,7 +13,9 @@ stdenv.mkDerivation { sha256 = "1mp7i42cm9w9grmcsa69m3h1ycpn6a48p43y4xj8rsc12x9nav3s"; }; - buildInputs = [ocaml findlib]; + nativeBuildInputs = [ ocaml findlib ]; + + strictDeps = true; dontConfigure = true; # Skip configure phase diff --git a/pkgs/development/ocaml-modules/csv/1.5.nix b/pkgs/development/ocaml-modules/csv/1.5.nix index ee68782313c5..cd298fb39a9f 100644 --- a/pkgs/development/ocaml-modules/csv/1.5.nix +++ b/pkgs/development/ocaml-modules/csv/1.5.nix @@ -9,7 +9,9 @@ stdenv.mkDerivation rec { sha256 = "1ca7jgg58j24pccs5fshis726s06fdcjshnwza5kwxpjgdbvc63g"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/ctypes/default.nix b/pkgs/development/ocaml-modules/ctypes/default.nix index 8c20a68c2746..833ea45a8692 100644 --- a/pkgs/development/ocaml-modules/ctypes/default.nix +++ b/pkgs/development/ocaml-modules/ctypes/default.nix @@ -15,10 +15,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-eu5RAuPYC97IM4XUsUw3HQ1BJlEHQ+eBpsdUE6hd+Q8="; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ocaml findlib ncurses ]; + nativeBuildInputs = [ pkg-config ocaml findlib ]; + buildInputs = [ ncurses ]; propagatedBuildInputs = [ integers libffi bigarray-compat ]; + strictDeps = true; + buildPhase = '' make XEN=false libffi.config ctypes-base ctypes-stubs make XEN=false ctypes-foreign diff --git a/pkgs/development/ocaml-modules/digestif/default.nix b/pkgs/development/ocaml-modules/digestif/default.nix index 2ddaec5c7c1d..dba0bcb9269e 100644 --- a/pkgs/development/ocaml-modules/digestif/default.nix +++ b/pkgs/development/ocaml-modules/digestif/default.nix @@ -1,4 +1,5 @@ { lib, ocaml, fetchurl, buildDunePackage +, pkg-config, which , bigarray-compat, eqaf, stdlib-shims , alcotest, astring, bos, findlib, fpath }: @@ -14,8 +15,13 @@ buildDunePackage rec { sha256 = "01gwkbrznci4xdcbww4ysgsciz2qs0r8jsmhp0siwbcgcrf1jjv5"; }; + nativeBuildInputs = [ findlib which ]; + buildInputs = [ ocaml ]; + propagatedBuildInputs = [ bigarray-compat eqaf stdlib-shims ]; + strictDeps = !doCheck; + checkInputs = [ alcotest astring bos fpath ]; doCheck = lib.versionAtLeast ocaml.version "4.05"; diff --git a/pkgs/development/ocaml-modules/dolmen/default.nix b/pkgs/development/ocaml-modules/dolmen/default.nix index 9a21da986814..7a7a14192f9e 100644 --- a/pkgs/development/ocaml-modules/dolmen/default.nix +++ b/pkgs/development/ocaml-modules/dolmen/default.nix @@ -16,7 +16,9 @@ buildDunePackage rec { sha256 = "133l23mwxa9xy340izvk4zp5jqjz2cwsm2innsgs2kg85pd39c41"; }; - buildInputs = [ menhir ]; + strictDeps = true; + + nativeBuildInputs = [ menhir ]; propagatedBuildInputs = [ menhirLib fmt ]; # Testr are not compatible with menhir 20211128 diff --git a/pkgs/development/ocaml-modules/dolog/default.nix b/pkgs/development/ocaml-modules/dolog/default.nix index 64fb2b2c5a59..599cc356031b 100644 --- a/pkgs/development/ocaml-modules/dolog/default.nix +++ b/pkgs/development/ocaml-modules/dolog/default.nix @@ -11,7 +11,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-6wfqT5sqo4YA8XoHH3QhG6/TyzzXCzqjmnPuBArRoj8="; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/dum/default.nix b/pkgs/development/ocaml-modules/dum/default.nix index 7bdaf2dfad90..3faef36e8ec4 100644 --- a/pkgs/development/ocaml-modules/dum/default.nix +++ b/pkgs/development/ocaml-modules/dum/default.nix @@ -13,9 +13,11 @@ stdenv.mkDerivation rec { sha256 = "0yrxl97szjc0s2ghngs346x3y0xszx2chidgzxk93frjjpsr1mlr"; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; propagatedBuildInputs = [ easy-format ]; + strictDeps = true; + createFindlibDestdir = true; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/dypgen/default.nix b/pkgs/development/ocaml-modules/dypgen/default.nix index 5b5b107b694b..64017bd65fe2 100644 --- a/pkgs/development/ocaml-modules/dypgen/default.nix +++ b/pkgs/development/ocaml-modules/dypgen/default.nix @@ -17,7 +17,9 @@ stdenv.mkDerivation rec { sha256 = "ecb53d6e469e9ec4d57ee6323ff498d45b78883ae13618492488e7c5151fdd97"; }; - buildInputs = [ocaml findlib]; + nativeBuildInputs = [ ocaml findlib ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/elina/default.nix b/pkgs/development/ocaml-modules/elina/default.nix index 2ddef0f40529..df7f140e5458 100644 --- a/pkgs/development/ocaml-modules/elina/default.nix +++ b/pkgs/development/ocaml-modules/elina/default.nix @@ -8,10 +8,12 @@ stdenv.mkDerivation rec { sha256 = "1nymykskq1yx87y4xl6hl9i4q6kv0qaq25rniqgl1bfn883p1ysc"; }; - buildInputs = [ perl ocaml findlib ]; + nativeBuildInputs = [ perl ocaml findlib ]; propagatedBuildInputs = [ apron camlidl gmp mpfr ]; + strictDeps = true; + prefixKey = "--prefix "; configureFlags = [ "--use-apron" diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index 69ac628d2014..e3af173edc91 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -6,6 +6,7 @@ , ocaml , lwt_react , opaline +, ocamlbuild , ppx_deriving , findlib , js_of_ocaml-ocamlbuild @@ -28,13 +29,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-VNxzpVpXEGlixyjadbW0GjL83jcKV5TWd46UReNYO6w="; }; - buildInputs = [ + nativeBuildInputs = [ ocaml which findlib + opaline + ocamlbuild + ]; + buildInputs = [ js_of_ocaml-ocamlbuild js_of_ocaml-ppx_deriving_json - opaline ocamlnet ]; @@ -48,6 +52,8 @@ stdenv.mkDerivation rec { ppx_deriving ]; + strictDeps = true; + installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR"; setupHook = [ ./setup-hook.sh ]; diff --git a/pkgs/development/ocaml-modules/enumerate/default.nix b/pkgs/development/ocaml-modules/enumerate/default.nix index d7f467e8eb98..9bedc4215108 100644 --- a/pkgs/development/ocaml-modules/enumerate/default.nix +++ b/pkgs/development/ocaml-modules/enumerate/default.nix @@ -15,9 +15,11 @@ stdenv.mkDerivation rec { sha256 = "0b6mx5p01lcpimvak4wx6aj2119707wsfzd83rwgb91bhpgzh156"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; propagatedBuildInputs = [ type_conv camlp4 ]; + strictDeps = true; + createFindlibDestdir = true; meta = { diff --git a/pkgs/development/ocaml-modules/erm_xml/default.nix b/pkgs/development/ocaml-modules/erm_xml/default.nix index fa072f8bd1c1..ebf9cdaad69a 100644 --- a/pkgs/development/ocaml-modules/erm_xml/default.nix +++ b/pkgs/development/ocaml-modules/erm_xml/default.nix @@ -15,7 +15,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-OQdLTq9tJZc6XlcuPv2gxzYiQAUGd6AiBzfSi169XL0="; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/erm_xmpp/default.nix b/pkgs/development/ocaml-modules/erm_xmpp/default.nix index 3447d590ea23..1507154d2f64 100644 --- a/pkgs/development/ocaml-modules/erm_xmpp/default.nix +++ b/pkgs/development/ocaml-modules/erm_xmpp/default.nix @@ -13,9 +13,12 @@ stdenv.mkDerivation rec { sha256 = "0spzyd9kbyizzwl8y3mq8z19zlkzxnkh2fppry4lyc7vaw7bqrwq"; }; - buildInputs = [ ocaml findlib ocamlbuild camlp4 ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ]; + buildInputs = [ camlp4 ]; propagatedBuildInputs = [ erm_xml mirage-crypto mirage-crypto-rng base64 ]; + strictDeps = true; + configurePhase = '' runHook preConfigure ocaml setup.ml -configure --prefix $out diff --git a/pkgs/development/ocaml-modules/expat/0.9.nix b/pkgs/development/ocaml-modules/expat/0.9.nix index 219b8164e7c9..326ffc60b1ad 100644 --- a/pkgs/development/ocaml-modules/expat/0.9.nix +++ b/pkgs/development/ocaml-modules/expat/0.9.nix @@ -18,7 +18,10 @@ stdenv.mkDerivation rec { sha256 = "16n2j3y0jc9xgqyshw9plrwqnjiz30vnpbhahmgxlidbycw8rgjz"; }; - buildInputs = [ocaml findlib ounit expat]; + nativeBuildInputs = [ocaml findlib ]; + buildInputs = [ ounit expat]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/expat/default.nix b/pkgs/development/ocaml-modules/expat/default.nix index e951acaa71a5..6fb7927073d4 100644 --- a/pkgs/development/ocaml-modules/expat/default.nix +++ b/pkgs/development/ocaml-modules/expat/default.nix @@ -15,7 +15,10 @@ stdenv.mkDerivation rec { substituteInPlace Makefile --replace "gcc" "\$(CC)" ''; - buildInputs = [ ocaml findlib expat ounit ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ expat ounit ]; + + strictDeps = true; doCheck = !lib.versionAtLeast ocaml.version "4.06"; checkTarget = "testall"; diff --git a/pkgs/development/ocaml-modules/extlib/default.nix b/pkgs/development/ocaml-modules/extlib/default.nix index d1860788838a..7f50548f4b87 100644 --- a/pkgs/development/ocaml-modules/extlib/default.nix +++ b/pkgs/development/ocaml-modules/extlib/default.nix @@ -12,7 +12,9 @@ stdenv.mkDerivation rec { sha256 = "0npq4hq3zym8nmlyji7l5cqk6drx2rkcx73d60rxqh5g8dla8p4k"; }; - buildInputs = [ ocaml findlib cppo ]; + nativeBuildInputs = [ ocaml findlib cppo ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/farfadet/default.nix b/pkgs/development/ocaml-modules/farfadet/default.nix index 79b742da575d..1ac5595a015b 100644 --- a/pkgs/development/ocaml-modules/farfadet/default.nix +++ b/pkgs/development/ocaml-modules/farfadet/default.nix @@ -15,10 +15,13 @@ stdenv.mkDerivation rec { sha256 = "0nlafnp0pwx0n4aszpsk6nvcvqi9im306p4jhx70si7k3xprlr2j"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; propagatedBuildInputs = [ faraday ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = { diff --git a/pkgs/development/ocaml-modules/fmt/default.nix b/pkgs/development/ocaml-modules/fmt/default.nix index a66976b4a2b5..edf8d08eaaba 100644 --- a/pkgs/development/ocaml-modules/fmt/default.nix +++ b/pkgs/development/ocaml-modules/fmt/default.nix @@ -13,9 +13,11 @@ stdenv.mkDerivation rec { sha256 = "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"; }; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; - buildInputs = [ findlib topkg cmdliner ]; - propagatedBuildInputs = [ seq stdlib-shims ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; + propagatedBuildInputs = [ cmdliner seq stdlib-shims ]; + + strictDeps = true; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/fontconfig/default.nix b/pkgs/development/ocaml-modules/fontconfig/default.nix index f4afe80d532d..2eca9a4644b5 100644 --- a/pkgs/development/ocaml-modules/fontconfig/default.nix +++ b/pkgs/development/ocaml-modules/fontconfig/default.nix @@ -11,8 +11,11 @@ stdenv.mkDerivation { sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ocaml fontconfig ]; + nativeBuildInputs = [ pkg-config ocaml ]; + buildInputs = [ fontconfig ]; + + strictDeps = true; + makeFlags = [ "OCAML_STDLIB_DIR=$(out)/lib/ocaml/${lib.getVersion ocaml}/site-lib/" "OCAML_HAVE_OCAMLOPT=yes" diff --git a/pkgs/development/ocaml-modules/fpath/default.nix b/pkgs/development/ocaml-modules/fpath/default.nix index 532210888bf3..53489f69cc3e 100644 --- a/pkgs/development/ocaml-modules/fpath/default.nix +++ b/pkgs/development/ocaml-modules/fpath/default.nix @@ -13,10 +13,13 @@ stdenv.mkDerivation rec { sha256 = "03z7mj0sqdz465rc4drj1gr88l9q3nfs374yssvdjdyhjbqqzc0j"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; propagatedBuildInputs = [ astring ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = { diff --git a/pkgs/development/ocaml-modules/frontc/default.nix b/pkgs/development/ocaml-modules/frontc/default.nix index bc74a5b58a08..c05422497ee7 100644 --- a/pkgs/development/ocaml-modules/frontc/default.nix +++ b/pkgs/development/ocaml-modules/frontc/default.nix @@ -18,7 +18,9 @@ stdenv.mkDerivation rec { sha256 = "1dq5nks0c9gsbr1m8k39m1bniawr5hqcy1r8x5px7naa95ch06ak"; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; + + strictDeps = true; meta = with lib; { inherit (src.meta) homepage; diff --git a/pkgs/development/ocaml-modules/functory/default.nix b/pkgs/development/ocaml-modules/functory/default.nix index 959963c4752a..a05472366a21 100644 --- a/pkgs/development/ocaml-modules/functory/default.nix +++ b/pkgs/development/ocaml-modules/functory/default.nix @@ -21,7 +21,9 @@ stdenv.mkDerivation { inherit (param) sha256; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; + + strictDeps = true; installTargets = [ "ocamlfind-install" ]; diff --git a/pkgs/development/ocaml-modules/getopt/default.nix b/pkgs/development/ocaml-modules/getopt/default.nix index 3400774d4c07..e3bf2fb5d641 100644 --- a/pkgs/development/ocaml-modules/getopt/default.nix +++ b/pkgs/development/ocaml-modules/getopt/default.nix @@ -9,12 +9,14 @@ stdenv.mkDerivation rec { sha256 = "0bng2mmdixpmj23xn8krlnaq66k22iclwz46r8zjrsrq3wcn1xgn"; }; - buildInputs = [ + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + strictDeps = true; + doCheck = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/gg/default.nix b/pkgs/development/ocaml-modules/gg/default.nix index fb1920776900..ec8bbb31617d 100644 --- a/pkgs/development/ocaml-modules/gg/default.nix +++ b/pkgs/development/ocaml-modules/gg/default.nix @@ -18,7 +18,8 @@ stdenv.mkDerivation { sha256 = "sha256:0j7bpj8k17csnz6v6frkz9aycywsb7xmznnb31g8rbfk3626f3ci"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/gmetadom/default.nix b/pkgs/development/ocaml-modules/gmetadom/default.nix index 29df5ce8f4e4..50be2adcb384 100644 --- a/pkgs/development/ocaml-modules/gmetadom/default.nix +++ b/pkgs/development/ocaml-modules/gmetadom/default.nix @@ -21,11 +21,12 @@ stdenv.mkDerivation rec { configureFlags="--with-ocaml-lib-prefix=$out/lib/ocaml/${ocaml.version}/site-lib" ''; - - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ocaml findlib gdome2 libxslt]; + nativeBuildInputs = [ pkg-config ocaml findlib ]; + buildInputs = [ gdome2 libxslt]; propagatedBuildInputs = [gdome2]; + strictDeps = true; + meta = { homepage = "http://gmetadom.sourceforge.net/"; description = "A collection of librares, each library providing a DOM implementation"; diff --git a/pkgs/development/ocaml-modules/hacl-star/default.nix b/pkgs/development/ocaml-modules/hacl-star/default.nix index 8a29439c7a59..004aa5c9a449 100644 --- a/pkgs/development/ocaml-modules/hacl-star/default.nix +++ b/pkgs/development/ocaml-modules/hacl-star/default.nix @@ -12,7 +12,9 @@ buildDunePackage { zarith ]; - buildInputs = [ + nativeBuildInputs = [ cppo ]; + + strictDeps = true; } diff --git a/pkgs/development/ocaml-modules/hacl-star/raw.nix b/pkgs/development/ocaml-modules/hacl-star/raw.nix index c7852338253c..58fa1eb00212 100644 --- a/pkgs/development/ocaml-modules/hacl-star/raw.nix +++ b/pkgs/development/ocaml-modules/hacl-star/raw.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { dontAddStaticConfigureFlags = true; configurePlatforms = []; - buildInputs = [ + nativeBuildInputs = [ which ocaml findlib @@ -42,6 +42,8 @@ stdenv.mkDerivation rec { cppo ]; + strictDeps = true; + doCheck = true; meta = { diff --git a/pkgs/development/ocaml-modules/herelib/default.nix b/pkgs/development/ocaml-modules/herelib/default.nix index 14c775d25fcd..f9267ede60ae 100644 --- a/pkgs/development/ocaml-modules/herelib/default.nix +++ b/pkgs/development/ocaml-modules/herelib/default.nix @@ -1,4 +1,4 @@ -{ lib, buildOcaml, fetchFromGitHub }: +{ lib, buildOcaml, fetchFromGitHub, camlp4 }: buildOcaml rec { version = "112.35.00"; @@ -13,6 +13,10 @@ buildOcaml rec { sha256 = "sha256-EuMhHu2na3lcpsJ1wMVOgBr6VKndlonq8jgAW01eelI="; }; + strictDeps = true; + + buildInputs = [ camlp4 ]; + meta = with lib; { homepage = "https://github.com/janestreet/herelib"; description = "Syntax extension for inserting the current location"; diff --git a/pkgs/development/ocaml-modules/hidapi/default.nix b/pkgs/development/ocaml-modules/hidapi/default.nix index 2caa25654e39..44b1d5f150a8 100644 --- a/pkgs/development/ocaml-modules/hidapi/default.nix +++ b/pkgs/development/ocaml-modules/hidapi/default.nix @@ -13,9 +13,12 @@ buildDunePackage rec { sha256 = "1j7rd7ajrzla76r3sxljx6fb18f4f4s3jd7vhv59l2ilxyxycai2"; }; + strictDeps = true; + minimumOCamlVersion = "4.03"; - buildInputs = [ pkgs.hidapi pkg-config dune-configurator ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ pkgs.hidapi dune-configurator ]; propagatedBuildInputs = [ bigstring ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/hmap/default.nix b/pkgs/development/ocaml-modules/hmap/default.nix index 67622a8ef6a0..d0ae47031b23 100644 --- a/pkgs/development/ocaml-modules/hmap/default.nix +++ b/pkgs/development/ocaml-modules/hmap/default.nix @@ -22,7 +22,10 @@ stdenv.mkDerivation rec { sha256 = "10xyjy4ab87z7jnghy0wnla9wrmazgyhdwhr4hdmxxdn28dxn03a"; }; - buildInputs = [ ocaml ocamlbuild findlib topkg ]; + nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ]; + buildInputs = [ topkg ]; + + strictDeps = true; inherit (topkg) installPhase; diff --git a/pkgs/development/ocaml-modules/hxd/default.nix b/pkgs/development/ocaml-modules/hxd/default.nix index 0775e21b1f8d..0b05a83dd7ef 100644 --- a/pkgs/development/ocaml-modules/hxd/default.nix +++ b/pkgs/development/ocaml-modules/hxd/default.nix @@ -21,14 +21,11 @@ buildDunePackage rec { sed -i 's|yes ".\+"|& 2> /dev/null|' test/*.t ''; - nativeBuildInputs = [ - dune-configurator - ]; - propagatedBuildInputs = lib.optional withLwt lwt; buildInputs = [ cmdliner + dune-configurator ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/inifiles/default.nix b/pkgs/development/ocaml-modules/inifiles/default.nix index 90308ee7d6d9..cbeae7bca839 100644 --- a/pkgs/development/ocaml-modules/inifiles/default.nix +++ b/pkgs/development/ocaml-modules/inifiles/default.nix @@ -16,9 +16,11 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; propagatedBuildInputs = [ ocaml_pcre ]; + strictDeps = true; + buildFlags = [ "all" "opt" ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/inotify/default.nix b/pkgs/development/ocaml-modules/inotify/default.nix index e8289d929637..d1c6dc376164 100644 --- a/pkgs/development/ocaml-modules/inotify/default.nix +++ b/pkgs/development/ocaml-modules/inotify/default.nix @@ -19,9 +19,13 @@ stdenv.mkDerivation rec { sha256 = "04lfxrrsmk2mc704kaln8jqx93jc4bkxhijmfy2d4cmk1cim7r6k"; }) ]; - buildInputs = [ ocaml findlib ocamlbuild ocaml_lwt ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ ocaml_lwt ]; checkInputs = [ ounit fileutils ]; + # Otherwise checkInputs can't be found + strictDeps = false; + configureFlags = [ "--enable-lwt" (lib.optionalString doCheck "--enable-tests") ]; diff --git a/pkgs/development/ocaml-modules/iso8601/default.nix b/pkgs/development/ocaml-modules/iso8601/default.nix index add18281008c..ff9ce94bbbd4 100644 --- a/pkgs/development/ocaml-modules/iso8601/default.nix +++ b/pkgs/development/ocaml-modules/iso8601/default.nix @@ -11,7 +11,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-sXnYAJcU88797orzzfbA2XG91Lk8mDV677J1Am5o7Xo="; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + + strictDeps = true; + createFindlibDestdir = true; meta = { diff --git a/pkgs/development/ocaml-modules/janestreet/0.12.nix b/pkgs/development/ocaml-modules/janestreet/0.12.nix index 10d8886d9947..ec2f793caf91 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.12.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.12.nix @@ -24,6 +24,7 @@ with self; hash = "0gl89zpgsf3n30nb6v5cns27g2bfg4rf3s2427gqvwbkr5gcf7ri"; meta.description = "Full standard library replacement for OCaml"; propagatedBuildInputs = [ sexplib0 ]; + buildInputs = [ dune-configurator ]; }; stdio = janePackage { diff --git a/pkgs/development/ocaml-modules/janestreet/0.14.nix b/pkgs/development/ocaml-modules/janestreet/0.14.nix index d22a87a92f3f..7d1c85447097 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.14.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.14.nix @@ -203,6 +203,8 @@ with self; meta.description = "Trivial metaprogramming tool"; propagatedBuildInputs = [ re ]; checkInputs = [ ppx_jane ]; + # This currently fails with dune + strictDeps = false; }; core = janePackage { @@ -761,6 +763,8 @@ with self; buildInputs = [ jst-config ]; propagatedBuildInputs = [ textutils ]; checkInputs = [ ounit ]; + # This currently fails with dune + strictDeps = false; }; shexp = janePackage { diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage.nix b/pkgs/development/ocaml-modules/janestreet/janePackage.nix index 9a67db4966ce..63c4a900fced 100644 --- a/pkgs/development/ocaml-modules/janestreet/janePackage.nix +++ b/pkgs/development/ocaml-modules/janestreet/janePackage.nix @@ -1,9 +1,9 @@ { lib, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.11.0" }: -{ pname, version ? defaultVersion, hash, ...}@args: +{ pname, version ? defaultVersion, hash, buildInputs ? [], ...}@args: buildDunePackage (args // { - inherit version; + inherit version buildInputs; minimumOCamlVersion = "4.04"; @@ -14,6 +14,8 @@ buildDunePackage (args // { sha256 = hash; }; + strictDeps = true; + meta = { license = lib.licenses.asl20; homepage = "https://github.com/janestreet/${pname}"; diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix b/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix index 6c7d746e9481..ebde7b240ef7 100644 --- a/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix +++ b/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix @@ -1,12 +1,14 @@ { lib, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.12.0" }: -{ pname, version ? defaultVersion, hash, ...}@args: +{ pname, version ? defaultVersion, hash, buildInputs ? [], ...}@args: buildDunePackage (args // { - inherit version; + inherit version buildInputs; minimumOCamlVersion = "4.07"; + useDune2 = true; + src = fetchFromGitHub { owner = "janestreet"; repo = pname; @@ -14,6 +16,8 @@ buildDunePackage (args // { sha256 = hash; }; + strictDeps = true; + meta = { license = lib.licenses.mit; homepage = "https://github.com/janestreet/${pname}"; diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix b/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix index 1ed2e6bc4f20..d124baea8972 100644 --- a/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix +++ b/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix @@ -5,11 +5,13 @@ , hash , minimumOCamlVersion ? "4.08" , doCheck ? true +, buildInputs ? [] +, strictDeps ? true , ...}@args: buildDunePackage (args // { useDune2 = true; - inherit version; + inherit version buildInputs strictDeps; inherit minimumOCamlVersion; diff --git a/pkgs/development/ocaml-modules/javalib/default.nix b/pkgs/development/ocaml-modules/javalib/default.nix index 78b61de8d9c1..ccd3fa19a92c 100644 --- a/pkgs/development/ocaml-modules/javalib/default.nix +++ b/pkgs/development/ocaml-modules/javalib/default.nix @@ -23,7 +23,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-du1h+S+A7CetMXofsYxdGeSsobCgspDB9oUE9WNUbbo="; }; - buildInputs = [ which ocaml findlib ]; + nativeBuildInputs = [ which ocaml findlib ]; + + strictDeps = true; patches = [ ./configure.sh.patch ./Makefile.config.example.patch ]; diff --git a/pkgs/development/ocaml-modules/jsonm/default.nix b/pkgs/development/ocaml-modules/jsonm/default.nix index c228242fda9e..2b9c9918382b 100644 --- a/pkgs/development/ocaml-modules/jsonm/default.nix +++ b/pkgs/development/ocaml-modules/jsonm/default.nix @@ -9,10 +9,12 @@ stdenv.mkDerivation rec { sha256 = "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"; }; - buildInputs = [ findlib topkg ]; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; propagatedBuildInputs = [ uutf ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = { diff --git a/pkgs/development/ocaml-modules/lablgl/default.nix b/pkgs/development/ocaml-modules/lablgl/default.nix index da4318aef4c1..85c27f93a091 100644 --- a/pkgs/development/ocaml-modules/lablgl/default.nix +++ b/pkgs/development/ocaml-modules/lablgl/default.nix @@ -15,7 +15,8 @@ stdenv.mkDerivation rec { sha256 = "sha256:141kc816iv59z96738i3vn9m9iw9g2zhi45hk4cchpwd99ar5l6k"; }; - buildInputs = [ ocaml findlib freeglut ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ freeglut ]; propagatedBuildInputs = [ libGLU libGL ]; patches = [ ./Makefile.config.patch ./META.patch ]; diff --git a/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix b/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix index f2fbc71b5a93..bcf82e1c3842 100644 --- a/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix +++ b/pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "09fqxwdib7r9yxynknc9gv3jw2hnhj5cak7q5jngk6m8rzvmhfcc"; }; - buildInputs = [ ocaml findlib camlp4 ]; + nativeBuildInputs = [ ocaml findlib camlp4 ]; propagatedBuildInputs = [ config-file lablgtk xmlm ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix index d97f2f5bffd2..736e345dfb35 100644 --- a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { sha256 = "1bbdp5j18s582mmyd7qiaq1p08g2ag4gl7x65pmzahbhg719hjda"; }; - buildInputs = [ ocaml findlib camlp4 ]; + nativeBuildInputs = [ ocaml findlib camlp4 ]; propagatedBuildInputs = [ config-file lablgtk xmlm ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix index f64b6571970b..f37c3b5c6f9a 100644 --- a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix +++ b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation (rec { sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ocaml findlib gtk2 libgnomecanvas gtksourceview camlp4 ]; + nativeBuildInputs = [ pkg-config ocaml findlib camlp4 ]; + buildInputs = [ gtk2 libgnomecanvas gtksourceview ]; configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; buildFlags = [ "world" ]; diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix index a442ae35aa52..36ade6979c3e 100644 --- a/pkgs/development/ocaml-modules/lablgtk/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -23,8 +23,8 @@ stdenv.mkDerivation { pname = "lablgtk"; inherit (param) version src; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ocaml findlib gtk2 libgnomecanvas gtksourceview ]; + nativeBuildInputs = [ pkg-config ocaml findlib ]; + buildInputs = [ gtk2 libgnomecanvas gtksourceview ]; configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; buildFlags = [ "world" ]; diff --git a/pkgs/development/ocaml-modules/labltk/default.nix b/pkgs/development/ocaml-modules/labltk/default.nix index 971668ce0e11..56e79ffc5904 100644 --- a/pkgs/development/ocaml-modules/labltk/default.nix +++ b/pkgs/development/ocaml-modules/labltk/default.nix @@ -51,7 +51,8 @@ stdenv.mkDerivation rec { inherit (param) version src; pname = "ocaml${ocaml.version}-labltk"; - buildInputs = [ ocaml findlib tcl tk makeWrapper ]; + nativeBuildInputs = [ ocaml findlib makeWrapper ]; + buildInputs = [ tcl tk ]; configureFlags = [ "--use-findlib" "--installbindir" "$(out)/bin" ]; dontAddPrefix = true; diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix index 264d95f39f67..9ab3d906ab1e 100644 --- a/pkgs/development/ocaml-modules/llvm/default.nix +++ b/pkgs/development/ocaml-modules/llvm/default.nix @@ -8,10 +8,12 @@ stdenv.mkDerivation { inherit (libllvm) src; - nativeBuildInputs = [ cmake ]; - buildInputs = [ python2 ocaml findlib ctypes ]; + nativeBuildInputs = [ cmake python2 ocaml findlib ]; + buildInputs = [ ctypes ]; propagatedBuildInputs = [ libllvm ]; + strictDeps = true; + cmakeFlags = [ "-DBUILD_SHARED_LIBS=YES" # fixes bytecode builds "-DLLVM_OCAML_OUT_OF_TREE=TRUE" diff --git a/pkgs/development/ocaml-modules/logs/default.nix b/pkgs/development/ocaml-modules/logs/default.nix index 157e7c52fee1..4359f09ebd32 100644 --- a/pkgs/development/ocaml-modules/logs/default.nix +++ b/pkgs/development/ocaml-modules/logs/default.nix @@ -21,11 +21,13 @@ stdenv.mkDerivation rec { sha256 = "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"; }; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; - buildInputs = [ findlib topkg fmt cmdliner lwt ] + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ fmt cmdliner lwt topkg ] ++ lib.optional jsooSupport js_of_ocaml; propagatedBuildInputs = [ result ]; + strictDeps = true; + buildPhase = "${topkg.run} build --with-js_of_ocaml ${lib.boolToString jsooSupport}"; inherit (topkg) installPhase; diff --git a/pkgs/development/ocaml-modules/lua-ml/default.nix b/pkgs/development/ocaml-modules/lua-ml/default.nix index 8a4f58ccbbd7..586fc395064f 100644 --- a/pkgs/development/ocaml-modules/lua-ml/default.nix +++ b/pkgs/development/ocaml-modules/lua-ml/default.nix @@ -16,8 +16,9 @@ stdenv.mkDerivation rec { sha256 = "04lv98nxmzanvyn4c0k6k0ax29f5xfdl8qzpf5hwadslq213a044"; }; - nativeBuildInputs = [ opaline ]; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ opaline ocaml findlib ocamlbuild ]; + + strictDeps = true; buildFlags = [ "lib" ]; diff --git a/pkgs/development/ocaml-modules/lwt-exit/default.nix b/pkgs/development/ocaml-modules/lwt-exit/default.nix index 34aadc8761fb..a2a6f14524f9 100644 --- a/pkgs/development/ocaml-modules/lwt-exit/default.nix +++ b/pkgs/development/ocaml-modules/lwt-exit/default.nix @@ -24,7 +24,8 @@ buildDunePackage rec { ptime ]; - doCheck = true; + # for some reason this never exits + doCheck = false; meta = { description = "An opinionated clean-exit and signal-handling library for Lwt programs"; diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix index 76e973a813e4..c9d5200d8768 100644 --- a/pkgs/development/ocaml-modules/lwt/default.nix +++ b/pkgs/development/ocaml-modules/lwt/default.nix @@ -19,9 +19,12 @@ buildDunePackage rec { sha256 = "sha256-XpoRKcdNo2j05Gxm5wmKSdwqimFDSWvmLyooPYTHAjM="; }; - nativeBuildInputs = [ pkg-config cppo dune-configurator ]; - buildInputs = optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims - ++ optional (!versionAtLeast ocaml.version "4.07") ncurses; + strictDeps = true; + + nativeBuildInputs = [ pkg-config cppo ]; + buildInputs = [ dune-configurator ] + ++ optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims + ++ optional (!versionAtLeast ocaml.version "4.07") ncurses; propagatedBuildInputs = [ libev mmap ocplib-endian seq result ]; meta = { diff --git a/pkgs/development/ocaml-modules/macaque/default.nix b/pkgs/development/ocaml-modules/macaque/default.nix index a91e898227d6..d47c0c4f11c5 100644 --- a/pkgs/development/ocaml-modules/macaque/default.nix +++ b/pkgs/development/ocaml-modules/macaque/default.nix @@ -11,8 +11,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-W9ZFaINYYtIikKy/ZqdlKeFQSA7DQT9plc3+ZhlSIJI="; }; - buildInputs = [ ocaml findlib ocamlbuild camlp4 ]; - propagatedBuildInputs = [ pgocaml ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ]; + propagatedBuildInputs = [ pgocaml camlp4 ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/magick/default.nix b/pkgs/development/ocaml-modules/magick/default.nix index f9fec120a625..87c43fb68693 100644 --- a/pkgs/development/ocaml-modules/magick/default.nix +++ b/pkgs/development/ocaml-modules/magick/default.nix @@ -13,8 +13,10 @@ stdenv.mkDerivation rec { sha256 = "0gn9l2qdr8gby2x8c2mb59x1kipb2plr45rbq6ymcxyi0wmzfh3q"; }; - nativeBuildInputs = [ which pkg-config ]; - buildInputs = [ ocaml findlib imagemagick ]; + nativeBuildInputs = [ which pkg-config ocaml findlib ]; + buildInputs = [ imagemagick ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/merlin-extend/default.nix b/pkgs/development/ocaml-modules/merlin-extend/default.nix index 6d4fcad09775..9cb35f34c1c2 100644 --- a/pkgs/development/ocaml-modules/merlin-extend/default.nix +++ b/pkgs/development/ocaml-modules/merlin-extend/default.nix @@ -11,7 +11,9 @@ buildDunePackage rec { sha256 = "0hvc4mz92x3rl2dxwrhvhzwl4gilnyvvwcqgr45vmdpyjyp3dwn2"; }; - buildInputs = [ cppo ]; + strictDeps = true; + + nativeBuildInputs = [ cppo ]; meta = with lib; { homepage = "https://github.com/let-def/merlin-extend"; diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix index 102d3d2de07e..c942972597ad 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix @@ -19,13 +19,16 @@ buildDunePackage rec { doCheck = true; checkInputs = [ ounit ]; - nativeBuildInputs = [ dune-configurator pkg-config ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ cstruct eqaf ] ++ lib.optionals withFreestanding [ ocaml-freestanding ]; + strictDeps = !doCheck; + meta = with lib; { homepage = "https://github.com/mirage/mirage-crypto"; description = "Simple symmetric cryptography for the modern age"; diff --git a/pkgs/development/ocaml-modules/mirage-crypto/ec.nix b/pkgs/development/ocaml-modules/mirage-crypto/ec.nix index bcd7a1f04f25..5506243ec3a4 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/ec.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/ec.nix @@ -1,4 +1,5 @@ { lib +, ocaml , buildDunePackage , mirage-crypto , dune-configurator @@ -16,18 +17,18 @@ , ocaml-freestanding }: -buildDunePackage { +buildDunePackage rec { pname = "mirage-crypto-ec"; inherit (mirage-crypto) minimumOCamlVersion src version - useDune2 - ; + useDune2; - nativeBuildInputs = [ - pkg-config + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ + ocaml dune-configurator ]; propagatedBuildInputs = [ @@ -38,6 +39,8 @@ buildDunePackage { ocaml-freestanding ]; + strictDeps = !doCheck; + doCheck = true; checkInputs = [ hex diff --git a/pkgs/development/ocaml-modules/mirage-crypto/pk.nix b/pkgs/development/ocaml-modules/mirage-crypto/pk.nix index 82400b5da7c2..9a2b9c98e458 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/pk.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/pk.nix @@ -1,7 +1,7 @@ { buildDunePackage, ounit, randomconv, mirage-crypto, mirage-crypto-rng , cstruct, sexplib0, zarith, eqaf, gmp }: -buildDunePackage { +buildDunePackage rec { pname = "mirage-crypto-pk"; inherit (mirage-crypto) version src useDune2 minimumOCamlVersion; @@ -10,6 +10,8 @@ buildDunePackage { propagatedBuildInputs = [ cstruct mirage-crypto mirage-crypto-rng zarith eqaf sexplib0 ]; + strictDeps = !doCheck; + doCheck = true; checkInputs = [ ounit randomconv ]; diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix index e8c8dd06eab5..91da7aa56816 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng-async.nix @@ -8,7 +8,7 @@ buildDunePackage { inherit (mirage-crypto) useDune2 version minimumOCamlVersion src; - nativeBuildInputs = [ + buildInputs = [ dune-configurator ]; @@ -19,6 +19,8 @@ buildDunePackage { mirage-crypto-rng ]; + strictDeps = true; + meta = mirage-crypto.meta // { description = "Feed the entropy source in an Async-friendly way"; }; diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix index 5152d3c8ecde..8d67ade9b465 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng-mirage.nix @@ -3,7 +3,7 @@ , logs, lwt }: -buildDunePackage { +buildDunePackage rec { pname = "mirage-crypto-rng-mirage"; inherit (mirage-crypto-rng) version src useDune2 minimumOCamlVersion; @@ -14,6 +14,8 @@ buildDunePackage { propagatedBuildInputs = [ duration cstruct mirage-crypto-rng mirage-runtime mirage-time mirage-clock logs lwt ]; + strictDeps = !doCheck; + meta = mirage-crypto-rng.meta // { description = "Entropy collection for a cryptographically secure PRNG"; }; diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng.nix index b4da06816351..2281f10580cd 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng.nix @@ -1,7 +1,7 @@ { buildDunePackage, mirage-crypto, ounit, randomconv, dune-configurator , cstruct, duration, logs, mtime, ocaml_lwt }: -buildDunePackage { +buildDunePackage rec { pname = "mirage-crypto-rng"; inherit (mirage-crypto) version src useDune2 minimumOCamlVersion; @@ -9,9 +9,11 @@ buildDunePackage { doCheck = true; checkInputs = [ ounit randomconv ]; - nativeBuildInputs = [ dune-configurator ]; + buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ cstruct mirage-crypto duration logs mtime ocaml_lwt ]; + strictDeps = !doCheck; + meta = mirage-crypto.meta // { description = "A cryptographically secure PRNG"; }; diff --git a/pkgs/development/ocaml-modules/mlgmp/default.nix b/pkgs/development/ocaml-modules/mlgmp/default.nix index ffd78150689a..a396549d76f4 100644 --- a/pkgs/development/ocaml-modules/mlgmp/default.nix +++ b/pkgs/development/ocaml-modules/mlgmp/default.nix @@ -21,7 +21,10 @@ stdenv.mkDerivation rec { ]; preConfigure = "make clean"; - buildInputs = [ocaml findlib gmp mpfr ncurses]; + nativeBuildInputs = [ocaml findlib ]; + buildInputs = [ gmp mpfr ncurses]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/mlgmpidl/default.nix b/pkgs/development/ocaml-modules/mlgmpidl/default.nix index 4e27c8ff3bb7..d12329b811e6 100644 --- a/pkgs/development/ocaml-modules/mlgmpidl/default.nix +++ b/pkgs/development/ocaml-modules/mlgmpidl/default.nix @@ -10,7 +10,10 @@ stdenv.mkDerivation rec { sha256 = "17xqiclaqs4hmnb92p9z6z9a1xfr31vcn8nlnj8ykk57by31vfza"; }; - buildInputs = [ perl gmp mpfr ocaml findlib camlidl ]; + nativeBuildInputs = [ perl ocaml findlib mpfr camlidl ]; + buildInputs = [ gmp mpfr ]; + + strictDeps = true; prefixKey = "-prefix "; configureFlags = [ @@ -20,7 +23,7 @@ stdenv.mkDerivation rec { postConfigure = '' sed -i Makefile \ - -e 's|^ /bin/rm | rm |' + -e 's|/bin/rm|rm|' mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs ''; diff --git a/pkgs/development/ocaml-modules/mtime/default.nix b/pkgs/development/ocaml-modules/mtime/default.nix index 3e4438f6da58..ace29633964b 100644 --- a/pkgs/development/ocaml-modules/mtime/default.nix +++ b/pkgs/development/ocaml-modules/mtime/default.nix @@ -24,9 +24,10 @@ stdenv.mkDerivation { inherit (param) sha256; }; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; - buildInputs = [ findlib topkg ] - ++ optional jsooSupport js_of_ocaml; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ] ++ optional jsooSupport js_of_ocaml; + + strictDeps = true; buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}"; diff --git a/pkgs/development/ocaml-modules/mysql/default.nix b/pkgs/development/ocaml-modules/mysql/default.nix index 6ccdfa9cf81c..c980984a26c8 100644 --- a/pkgs/development/ocaml-modules/mysql/default.nix +++ b/pkgs/development/ocaml-modules/mysql/default.nix @@ -22,12 +22,14 @@ stdenv.mkDerivation rec { "--libdir=$out/lib/ocaml/${ocaml.version}/site-lib/mysql" ]; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; createFindlibDestdir = true; propagatedBuildInputs = [ libmysqlclient ]; + strictDeps = true; + patches = [ (fetchpatch { url = "https://github.com/ygrek/ocaml-mysql/compare/v1.2.1...d6d1b3b262ae2cf493ef56f1dd7afcf663a70a26.patch"; diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix index fdd24094c17b..d179c8c1c901 100644 --- a/pkgs/development/ocaml-modules/nocrypto/default.nix +++ b/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -56,9 +56,11 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ ocaml findlib ocamlbuild cc-wrapper ]; - buildInputs = [ ocamlbuild findlib topkg cpuid ocb-stubblr ]; + buildInputs = [ topkg cpuid ocb-stubblr ocamlbuild ]; propagatedBuildInputs = [ cstruct ppx_deriving ppx_sexp_conv sexplib zarith ] ++ optional withLwt cstruct-lwt; + strictDeps = true; + buildPhase = "${topkg.buildPhase} --accelerate false --with-lwt ${boolToString withLwt}"; inherit (topkg) installPhase; diff --git a/pkgs/development/ocaml-modules/notty/default.nix b/pkgs/development/ocaml-modules/notty/default.nix index 94342bb31282..1598b2ee5cd3 100644 --- a/pkgs/development/ocaml-modules/notty/default.nix +++ b/pkgs/development/ocaml-modules/notty/default.nix @@ -19,10 +19,13 @@ stdenv.mkDerivation rec { sha256 = "1y3hx8zjri3x50nyiqal5gak1sw54gw3xssrqbj7srinvkdmrz1q"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ocb-stubblr ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ ocb-stubblr topkg ocamlbuild ]; propagatedBuildInputs = [ result uucp uuseg uutf ] ++ optional withLwt lwt; + strictDeps = true; + buildPhase = topkg.buildPhase + " --with-lwt ${boolToString withLwt}"; diff --git a/pkgs/development/ocaml-modules/num/default.nix b/pkgs/development/ocaml-modules/num/default.nix index b1293a2ab553..1f978a90df45 100644 --- a/pkgs/development/ocaml-modules/num/default.nix +++ b/pkgs/development/ocaml-modules/num/default.nix @@ -17,11 +17,11 @@ stdenv.mkDerivation rec { ] ++ lib.optional withStatic ./enable-static.patch; nativeBuildInputs = [ ocaml findlib ]; - buildInputs = [ ocaml findlib ]; + + strictDeps = true; createFindlibDestdir = true; - meta = { description = "Legacy Num library for arbitrary-precision integer and rational arithmetic"; license = lib.licenses.lgpl21; diff --git a/pkgs/development/ocaml-modules/ocaml-cairo/default.nix b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix index 7d2960fc5a66..6748619d4928 100644 --- a/pkgs/development/ocaml-modules/ocaml-cairo/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix @@ -19,9 +19,8 @@ stdenv.mkDerivation rec { patches = [ ./META.patch ]; - nativeBuildInputs = [ pkg-config unzip ]; - buildInputs = [ ocaml automake gnum4 autoconf - findlib freetype lablgtk cairo gdk-pixbuf gtk2 pango ]; + nativeBuildInputs = [ pkg-config unzip ocaml automake gnum4 autoconf findlib ]; + buildInputs = [ freetype lablgtk cairo gdk-pixbuf gtk2 pango ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix index 581890178eae..b4410981afbd 100644 --- a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix @@ -13,9 +13,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libvirt ]; - nativeBuildInputs = [ autoreconfHook pkg-config findlib perl ]; + nativeBuildInputs = [ autoreconfHook pkg-config findlib perl ocaml ]; - buildInputs = [ ocaml ]; + strictDeps = true; buildFlags = [ "all" "opt" "CPPFLAGS=-Wno-error" ]; installTargets = "install-opt"; diff --git a/pkgs/development/ocaml-modules/ocaml-r/default.nix b/pkgs/development/ocaml-modules/ocaml-r/default.nix index d76a98fc05c9..fcee63de3b5d 100644 --- a/pkgs/development/ocaml-modules/ocaml-r/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-r/default.nix @@ -27,7 +27,11 @@ buildDunePackage rec { ' libRmath"' '"' ''; - buildInputs = [ pkg-config R dune-configurator stdio ]; + # This currently fails with dune + strictDeps = false; + + nativeBuildInputs = [ pkg-config R ]; + buildInputs = [ dune-configurator stdio R ]; doCheck = true; checkInputs = [ alcotest ]; diff --git a/pkgs/development/ocaml-modules/ocamlfuse/default.nix b/pkgs/development/ocaml-modules/ocamlfuse/default.nix index c2ca6a2cc8aa..4dcaca427886 100644 --- a/pkgs/development/ocaml-modules/ocamlfuse/default.nix +++ b/pkgs/development/ocaml-modules/ocamlfuse/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchFromGitHub, camlidl, fuse }: +{ lib, buildDunePackage, fetchFromGitHub, camlidl, fuse, dune-configurator }: buildDunePackage { pname = "ocamlfuse"; @@ -11,6 +11,11 @@ buildDunePackage { sha256 = "1v9g0wh7rnjkrjrnw50145g6ry38plyjs8fq8w0nlzwizhf3qhff"; }; + # This currently fails with dune + strictDeps = false; + + nativeBuildInputs = [ camlidl ]; + buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ camlidl fuse ]; meta = { diff --git a/pkgs/development/ocaml-modules/ocamlnat/default.nix b/pkgs/development/ocaml-modules/ocamlnat/default.nix index f8d20b7124bc..66bd00707add 100644 --- a/pkgs/development/ocaml-modules/ocamlnat/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnat/default.nix @@ -12,7 +12,10 @@ stdenv.mkDerivation rec { sha256 = "0dyvy0j6f47laxhnadvm71z1py9hz9zd49hamf6bij99cggb2ij1"; }; - buildInputs = [ocaml findlib ounit]; + nativeBuildInputs = [ocaml findlib ]; + buildInputs = [ ounit]; + + strictDeps = true; prefixKey = "--prefix "; diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix index d6e8f83968aa..d435d7a04842 100644 --- a/pkgs/development/ocaml-modules/ocamlnet/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -15,8 +15,10 @@ stdenv.mkDerivation rec { sha256 = "1vlwxjxr946gdl61a1d7yk859cijq45f60dhn54ik3w4g6cx33pr"; }; - nativeBuildInputs = [ pkg-config which ]; - buildInputs = [ ncurses ocaml findlib ocaml_pcre camlzip gnutls nettle ]; + nativeBuildInputs = [ pkg-config which ocaml findlib ]; + buildInputs = [ ncurses ocaml_pcre camlzip gnutls nettle ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/ocamlsdl/default.nix b/pkgs/development/ocaml-modules/ocamlsdl/default.nix index 7c782b5268fd..3482aa37e750 100644 --- a/pkgs/development/ocaml-modules/ocamlsdl/default.nix +++ b/pkgs/development/ocaml-modules/ocamlsdl/default.nix @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { sha256 = "abfb295b263dc11e97fffdd88ea1a28b46df8cc2b196777093e4fe7f509e4f8f"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ocaml findlib SDL SDL_image SDL_mixer SDL_ttf SDL_gfx lablgl]; + nativeBuildInputs = [ pkg-config ocaml findlib ]; + buildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx lablgl ]; propagatedBuildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx pkg-config ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/ocb-stubblr/default.nix b/pkgs/development/ocaml-modules/ocb-stubblr/default.nix index 2f26eb32ffb6..fcd63ced7a80 100644 --- a/pkgs/development/ocaml-modules/ocb-stubblr/default.nix +++ b/pkgs/development/ocaml-modules/ocb-stubblr/default.nix @@ -12,10 +12,13 @@ stdenv.mkDerivation rec { patches = [ ./pkg-config.patch ]; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ocamlbuild ]; propagatedBuildInputs = [ astring ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = { diff --git a/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix b/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix index 7635f3a686cd..763617be1328 100644 --- a/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix +++ b/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix @@ -14,7 +14,11 @@ stdenv.mkDerivation rec { sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn"; }; - buildInputs = [ ocaml findlib astring pprint ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ astring pprint ]; + + strictDeps = true; + createFindlibDestdir = true; installFlags = [ "BINDIR=$(out)/bin" ]; diff --git a/pkgs/development/ocaml-modules/ocplib-simplex/default.nix b/pkgs/development/ocaml-modules/ocplib-simplex/default.nix index 8435d1c5e516..474f69546d1a 100644 --- a/pkgs/development/ocaml-modules/ocplib-simplex/default.nix +++ b/pkgs/development/ocaml-modules/ocplib-simplex/default.nix @@ -15,8 +15,9 @@ stdenv.mkDerivation { sha256 = "09niyidrjzrj8g1qwx4wgsdf5m6cwrnzg7zsgala36jliic4di60"; }; - nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ autoreconfHook ocaml findlib ]; + + strictDeps = true; installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ]; diff --git a/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix b/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix index d2e20838ecaf..480ea6daf203 100644 --- a/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix @@ -26,7 +26,10 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; - buildInputs = [ ocaml findlib ocamlbuild oasis camlp4 num ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild oasis camlp4 ]; + buildInputs = [ oasis camlp4 ocamlbuild num ]; + + strictDeps = true; meta = { homepage = "https://github.com/ocsigen/deriving"; diff --git a/pkgs/development/ocaml-modules/ocsigen-start/default.nix b/pkgs/development/ocaml-modules/ocsigen-start/default.nix index 1fccbbb9b30c..118138dc8fd0 100644 --- a/pkgs/development/ocaml-modules/ocsigen-start/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-start/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocsigen-toolkit, pgocaml_ppx, safepass, yojson -, cohttp-lwt-unix +, cohttp-lwt-unix, eliom , resource-pooling , ocamlnet }: @@ -8,9 +8,11 @@ stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-ocsigen-start"; version = "4.3.0"; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib eliom ]; propagatedBuildInputs = [ pgocaml_ppx safepass ocsigen-toolkit yojson resource-pooling cohttp-lwt-unix ocamlnet ]; + strictDeps = true; + patches = [ ./templates-dir.patch ]; src = fetchFromGitHub { diff --git a/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix b/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix index 78420d09779b..1b2dd72a2ec3 100644 --- a/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix @@ -8,7 +8,9 @@ stdenv.mkDerivation rec { version = "3.0.1"; propagatedBuildInputs = [ calendar js_of_ocaml-ppx_deriving_json eliom ]; - buildInputs = [ ocaml findlib opaline ]; + nativeBuildInputs = [ ocaml findlib opaline eliom ]; + + strictDeps = true; installPhase = '' runHook preInstall diff --git a/pkgs/development/ocaml-modules/ocurl/default.nix b/pkgs/development/ocaml-modules/ocurl/default.nix index ea2af8dd4c82..5e815d4dca6b 100644 --- a/pkgs/development/ocaml-modules/ocurl/default.nix +++ b/pkgs/development/ocaml-modules/ocurl/default.nix @@ -13,8 +13,12 @@ stdenv.mkDerivation rec { sha256 = "0n621cxb9012pj280c7821qqsdhypj8qy9qgrah79dkh6a8h2py6"; }; - buildInputs = [ pkg-config ocaml findlib ncurses ]; + nativeBuildInputs = [ pkg-config ocaml findlib ]; + buildInputs = [ ncurses ]; propagatedBuildInputs = [ curl lwt ]; + + strictDeps = true; + createFindlibDestdir = true; meta = { description = "OCaml bindings to libcurl"; diff --git a/pkgs/development/ocaml-modules/odate/default.nix b/pkgs/development/ocaml-modules/odate/default.nix index aed5e92765f8..8967a3815471 100644 --- a/pkgs/development/ocaml-modules/odate/default.nix +++ b/pkgs/development/ocaml-modules/odate/default.nix @@ -17,7 +17,9 @@ buildDunePackage rec { sha256 = "1dk33lr0g2jnia2gqsm6nnc7nf256qgkm3v30w477gm6y2ppfm3h"; }; - buildInputs = [ menhir ]; + strictDeps = true; + + nativeBuildInputs = [ menhir ]; meta = { description = "Date and duration in OCaml"; diff --git a/pkgs/development/ocaml-modules/odn/default.nix b/pkgs/development/ocaml-modules/odn/default.nix index 9179ce3f1d16..66fc5d1f1872 100644 --- a/pkgs/development/ocaml-modules/odn/default.nix +++ b/pkgs/development/ocaml-modules/odn/default.nix @@ -13,7 +13,10 @@ stdenv.mkDerivation rec { sha256 = "09a8zdyifpc2nl4hdvg9206142y31cq95ajgij011s1qcg3z93lj"; }; - buildInputs = [ ocaml findlib ocamlbuild type_conv ounit camlp4 ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ type_conv ounit camlp4 ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/omd/default.nix b/pkgs/development/ocaml-modules/omd/default.nix index d6cea183d85c..b9797e257abc 100644 --- a/pkgs/development/ocaml-modules/omd/default.nix +++ b/pkgs/development/ocaml-modules/omd/default.nix @@ -9,7 +9,9 @@ stdenv.mkDerivation rec { sha256 = "1sgdgzpx96br7npj8mh91cli5mqmzsjpngwm7x4212n3k1d0ivwa"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/opam-repository/default.nix b/pkgs/development/ocaml-modules/opam-repository/default.nix index 1480a7d5915a..ff9ad75fad86 100644 --- a/pkgs/development/ocaml-modules/opam-repository/default.nix +++ b/pkgs/development/ocaml-modules/opam-repository/default.nix @@ -15,8 +15,9 @@ buildDunePackage rec { --replace "SUBSTITUTE_NIXOS_CURL_PATH" "\"${curl}/bin/curl\"" ''; - nativeBuildInputs = [ unzip ]; - buildInputs = [ curl ]; + strictDeps = true; + + nativeBuildInputs = [ unzip curl ]; propagatedBuildInputs = [ opam-format ]; meta = opam-format.meta // { diff --git a/pkgs/development/ocaml-modules/otfm/default.nix b/pkgs/development/ocaml-modules/otfm/default.nix index 0642b30699c2..91d91bdc46fe 100644 --- a/pkgs/development/ocaml-modules/otfm/default.nix +++ b/pkgs/development/ocaml-modules/otfm/default.nix @@ -17,10 +17,13 @@ stdenv.mkDerivation { sha256 = "054s82539k3kc9na6s47g3scsl04icjahpas7pv5351jmsgqcq3k"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; propagatedBuildInputs = [ uutf result ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/otoml/default.nix b/pkgs/development/ocaml-modules/otoml/default.nix index 17e8fc855ea0..c3f53fc611e5 100644 --- a/pkgs/development/ocaml-modules/otoml/default.nix +++ b/pkgs/development/ocaml-modules/otoml/default.nix @@ -19,7 +19,9 @@ buildDunePackage rec { sha256 = "0l0c60rzgk11y8xq05kr8q9hkzb3c8vi995mq84x98ys73wb42j3"; }; - buildInputs = [ menhir ]; + strictDeps = true; + + nativeBuildInputs = [ menhir ]; propagatedBuildInputs = [ menhirLib uutf ]; diff --git a/pkgs/development/ocaml-modules/ounit/default.nix b/pkgs/development/ocaml-modules/ounit/default.nix index fbb75e613309..a40111cd3b37 100644 --- a/pkgs/development/ocaml-modules/ounit/default.nix +++ b/pkgs/development/ocaml-modules/ounit/default.nix @@ -4,9 +4,11 @@ stdenv.mkDerivation { pname = "ocaml${ocaml.version}-ounit"; inherit (ounit2) version src meta; - buildInputs = [ findlib ]; + nativeBuildInputs = [ findlib ]; propagatedBuildInputs = [ ounit2 ]; + strictDeps = true; + dontBuild = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/pipebang/default.nix b/pkgs/development/ocaml-modules/pipebang/default.nix index 489ca3d2c708..251aeb8de8ec 100644 --- a/pkgs/development/ocaml-modules/pipebang/default.nix +++ b/pkgs/development/ocaml-modules/pipebang/default.nix @@ -1,4 +1,4 @@ -{ lib, buildOcaml, fetchFromGitHub }: +{ lib, buildOcaml, fetchFromGitHub, camlp4 }: buildOcaml rec { pname = "pipebang"; @@ -13,6 +13,10 @@ buildOcaml rec { sha256 = "sha256-9A3X/ciL5HtuKQ5awS+hDDBLL5ytOr12wHsmJLNRn+Q="; }; + strictDeps = true; + + buildInputs = [ camlp4 ]; + meta = with lib; { homepage = "https://github.com/janestreet/pipebang"; description = "Syntax extension to transform x |! f into f x"; diff --git a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix index 590c001c4195..4f2e4693357f 100644 --- a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix +++ b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix @@ -12,7 +12,10 @@ stdenv.mkDerivation rec { sha256 = "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"; }; - buildInputs = [ ocaml findlib piqi stdlib-shims ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ piqi stdlib-shims ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/piqi/default.nix b/pkgs/development/ocaml-modules/piqi/default.nix index faeb804d8aa8..45d65a5be04f 100644 --- a/pkgs/development/ocaml-modules/piqi/default.nix +++ b/pkgs/development/ocaml-modules/piqi/default.nix @@ -12,9 +12,11 @@ stdenv.mkDerivation rec { sha256 = "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"; }; - buildInputs = [ ocaml findlib which ]; + nativeBuildInputs = [ ocaml findlib which ]; propagatedBuildInputs = [ sedlex_2 xmlm easy-format base64 ]; + strictDeps = true; + patches = [ ./no-ocamlpath-override.patch ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/ppx_cstubs/default.nix b/pkgs/development/ocaml-modules/ppx_cstubs/default.nix index 935d67f70845..f4794eea76ed 100644 --- a/pkgs/development/ocaml-modules/ppx_cstubs/default.nix +++ b/pkgs/development/ocaml-modules/ppx_cstubs/default.nix @@ -9,6 +9,7 @@ , num , ppxlib , re +, findlib }: buildDunePackage rec { @@ -26,17 +27,21 @@ buildDunePackage rec { sha256 = "15cjb9ygnvp2kv85rrb7ncz7yalifyl7wd2hp2cl8r1qrpgi1d0w"; }; + nativeBuildInputs = [ cppo ]; + buildInputs = [ bigarray-compat containers - cppo ctypes integers num ppxlib re + findlib ]; + strictDeps = true; + meta = with lib; { homepage = "https://github.com/fdopen/ppx_cstubs"; changelog = "https://github.com/fdopen/ppx_cstubs/raw/${version}/CHANGES.md"; diff --git a/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/pkgs/development/ocaml-modules/ppx_deriving/default.nix index 5563e6113462..090c8113ce48 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving/default.nix @@ -5,7 +5,7 @@ , ppxlib , ppx_derivers , result -, ounit +, ounit2 , ocaml-migrate-parsetree , ocaml-migrate-parsetree-2 }: @@ -37,7 +37,11 @@ buildDunePackage rec { inherit (params) sha256; }; - buildInputs = [ ppxlib cppo ]; + # This currently fails with dune + strictDeps = false; + + nativeBuildInputs = [ cppo ]; + buildInputs = [ ppxlib ]; propagatedBuildInputs = [ (if params.useOMP2 then ocaml-migrate-parsetree-2 @@ -47,7 +51,7 @@ buildDunePackage rec { ]; doCheck = true; - checkInputs = [ ounit ]; + checkInputs = [ ounit2 ]; meta = with lib; { description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02."; diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix index 64948c29ae50..59b7c29730aa 100644 --- a/pkgs/development/ocaml-modules/ppx_tools/default.nix +++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix @@ -5,6 +5,7 @@ let param = version = "6.4"; sha256 = "15v7yfv6gyp8lzlgwi9garz10wpg34dk4072jdv19n6v20zfg7n1"; useDune2 = true; + nativeBuildInputs = [cppo]; buildInputs = [cppo]; }; in { @@ -54,7 +55,9 @@ if lib.versionAtLeast param.version "6.0" then buildDunePackage { inherit pname src meta; - inherit (param) version useDune2 buildInputs; + inherit (param) version useDune2 buildInputs nativeBuildInputs; + + strictDeps = true; } else stdenv.mkDerivation { @@ -63,7 +66,8 @@ else inherit src; nativeBuildInputs = [ ocaml findlib ]; - buildInputs = [ ocaml findlib ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/psmt2-frontend/default.nix b/pkgs/development/ocaml-modules/psmt2-frontend/default.nix index dbdf3970f636..25c9ec4b870c 100644 --- a/pkgs/development/ocaml-modules/psmt2-frontend/default.nix +++ b/pkgs/development/ocaml-modules/psmt2-frontend/default.nix @@ -15,7 +15,9 @@ buildDunePackage rec { minimumOCamlVersion = "4.03"; - buildInputs = [ menhir ]; + strictDeps = true; + + nativeBuildInputs = [ menhir ]; meta = { description = "A simple parser and type-checker for polomorphic extension of the SMT-LIB 2 language"; diff --git a/pkgs/development/ocaml-modules/ptime/default.nix b/pkgs/development/ocaml-modules/ptime/default.nix index 7015c6058b4f..ac30876520a6 100644 --- a/pkgs/development/ocaml-modules/ptime/default.nix +++ b/pkgs/development/ocaml-modules/ptime/default.nix @@ -11,9 +11,10 @@ stdenv.mkDerivation rec { sha256 = "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27"; }; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; - buildInputs = [ findlib topkg ] - ++ lib.optional jsooSupport js_of_ocaml; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ] ++ lib.optional jsooSupport js_of_ocaml; + + strictDeps = true; propagatedBuildInputs = [ result ]; diff --git a/pkgs/development/ocaml-modules/ptmap/default.nix b/pkgs/development/ocaml-modules/ptmap/default.nix index 018f1e3edf06..fd59368f82df 100644 --- a/pkgs/development/ocaml-modules/ptmap/default.nix +++ b/pkgs/development/ocaml-modules/ptmap/default.nix @@ -14,12 +14,13 @@ buildDunePackage rec { sha256 = "1apk61fc1y1g7x3m3c91fnskvxp6i0vk5nxwvipj56k7x2pzilgb"; }; + strictDeps = true; + + buildInputs = [ stdlib-shims ]; propagatedBuildInputs = [ seq ]; doCheck = true; - checkInputs = [ stdlib-shims ]; - meta = { homepage = "https://www.lri.fr/~filliatr/software.en.html"; description = "Maps over integers implemented as Patricia trees"; diff --git a/pkgs/development/ocaml-modules/pyml/default.nix b/pkgs/development/ocaml-modules/pyml/default.nix index 4f7c4b1b2a28..afcc47e38dc4 100644 --- a/pkgs/development/ocaml-modules/pyml/default.nix +++ b/pkgs/development/ocaml-modules/pyml/default.nix @@ -11,9 +11,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-GCO6KlRhJmADFjQ5QF4naMQBskF63yqnJnLnuQsagEk="; }; - buildInputs = [ + nativeBuildInputs = [ ocaml findlib + ]; + buildInputs = [ utop ncurses ]; @@ -23,6 +25,8 @@ stdenv.mkDerivation rec { stdcompat ]; + strictDeps = true; + buildPhase = '' make all pymltop pymlutop PREFIX=$out ''; diff --git a/pkgs/development/ocaml-modules/react/default.nix b/pkgs/development/ocaml-modules/react/default.nix index 0edae9830698..4e07a2021e32 100644 --- a/pkgs/development/ocaml-modules/react/default.nix +++ b/pkgs/development/ocaml-modules/react/default.nix @@ -9,7 +9,10 @@ stdenv.mkDerivation rec { sha256 = "1aj8w79gdd9xnrbz7s5p8glcb4pmimi8jp9f439dqnf6ih3mqb3v"; }; - buildInputs = [ ocaml findlib topkg ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ topkg ]; + + strictDeps = true; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/reactivedata/default.nix b/pkgs/development/ocaml-modules/reactivedata/default.nix index bc0c8f9e9b8c..23ebb3144d11 100644 --- a/pkgs/development/ocaml-modules/reactivedata/default.nix +++ b/pkgs/development/ocaml-modules/reactivedata/default.nix @@ -15,9 +15,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-YLkacIbjxZQ/ThgSxjTqviBYih6eW2GX5H7iybQDv1A="; }; - buildInputs = [ ocaml findlib ocamlbuild opaline ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild opaline ]; propagatedBuildInputs = [ react ]; + strictDeps = true; + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR"; diff --git a/pkgs/development/ocaml-modules/reason-native/cli.nix b/pkgs/development/ocaml-modules/reason-native/cli.nix index 1a4c020dc352..ee5e7d2774d2 100644 --- a/pkgs/development/ocaml-modules/reason-native/cli.nix +++ b/pkgs/development/ocaml-modules/reason-native/cli.nix @@ -3,9 +3,12 @@ { pname = "cli"; + nativeBuildInputs = [ + reason + ]; + buildInputs = [ re - reason pastel ]; } diff --git a/pkgs/development/ocaml-modules/reason-native/console.nix b/pkgs/development/ocaml-modules/reason-native/console.nix index c11c12b46730..b4b30cab4a0c 100644 --- a/pkgs/development/ocaml-modules/reason-native/console.nix +++ b/pkgs/development/ocaml-modules/reason-native/console.nix @@ -3,7 +3,7 @@ { pname = "console"; - buildInputs = [ + nativeBuildInputs = [ reason ]; diff --git a/pkgs/development/ocaml-modules/reason-native/dir.nix b/pkgs/development/ocaml-modules/reason-native/dir.nix index e6eb9c0c403f..6b2aa0c3cd8f 100644 --- a/pkgs/development/ocaml-modules/reason-native/dir.nix +++ b/pkgs/development/ocaml-modules/reason-native/dir.nix @@ -3,7 +3,7 @@ { pname = "dir"; - buildInputs = [ + nativeBuildInputs = [ reason ]; diff --git a/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix b/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix index 749e727feeca..a7c663493ef5 100644 --- a/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix +++ b/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix @@ -3,7 +3,7 @@ { pname = "file-context-printer"; - buildInputs = [ + nativeBuildInputs = [ reason ]; diff --git a/pkgs/development/ocaml-modules/reason-native/fp.nix b/pkgs/development/ocaml-modules/reason-native/fp.nix index ae6ae50705d5..8ff2ed65c4c0 100644 --- a/pkgs/development/ocaml-modules/reason-native/fp.nix +++ b/pkgs/development/ocaml-modules/reason-native/fp.nix @@ -3,7 +3,7 @@ { pname = "fp"; - buildInputs = [ + nativeBuildInputs = [ reason ]; diff --git a/pkgs/development/ocaml-modules/reason-native/pastel-console.nix b/pkgs/development/ocaml-modules/reason-native/pastel-console.nix index f1d2c7cc7264..968b9f88af91 100644 --- a/pkgs/development/ocaml-modules/reason-native/pastel-console.nix +++ b/pkgs/development/ocaml-modules/reason-native/pastel-console.nix @@ -3,7 +3,7 @@ { pname = "pastel-console"; - buildInputs = [ + nativeBuildInputs = [ reason ]; diff --git a/pkgs/development/ocaml-modules/reason-native/pastel.nix b/pkgs/development/ocaml-modules/reason-native/pastel.nix index a5abc4e219c5..f2c975d938e0 100644 --- a/pkgs/development/ocaml-modules/reason-native/pastel.nix +++ b/pkgs/development/ocaml-modules/reason-native/pastel.nix @@ -5,7 +5,7 @@ minimalOCamlVersion = "4.05"; - buildInputs = [ + nativeBuildInputs = [ reason ]; propagatedBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix b/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix index 993bcbefafdc..1250dc2d3a71 100644 --- a/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix +++ b/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix @@ -3,7 +3,7 @@ { pname = "qcheck-rely"; - buildInputs = [ + nativeBuildInputs = [ reason ]; diff --git a/pkgs/development/ocaml-modules/reason-native/refmterr.nix b/pkgs/development/ocaml-modules/reason-native/refmterr.nix index 9b14d4a8ba31..b4d6708467f0 100644 --- a/pkgs/development/ocaml-modules/reason-native/refmterr.nix +++ b/pkgs/development/ocaml-modules/reason-native/refmterr.nix @@ -3,7 +3,7 @@ { pname = "refmterr"; - buildInputs = [ + nativeBuildInputs = [ reason ]; diff --git a/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix b/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix index 6e8b41bbd1c4..8a7080f624df 100644 --- a/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix +++ b/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix @@ -3,9 +3,12 @@ { pname = "rely-junit-reporter"; + nativeBuildInputs = [ + reason + ]; + buildInputs = [ atdgen - reason ]; propagatedBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/reason-native/rely.nix b/pkgs/development/ocaml-modules/reason-native/rely.nix index a2230426bec1..f29565f9c463 100644 --- a/pkgs/development/ocaml-modules/reason-native/rely.nix +++ b/pkgs/development/ocaml-modules/reason-native/rely.nix @@ -3,7 +3,7 @@ { pname = "rely"; - buildInputs = [ + nativeBuildInputs = [ reason ]; diff --git a/pkgs/development/ocaml-modules/rope/default.nix b/pkgs/development/ocaml-modules/rope/default.nix index 9410ab21ea34..9ac090a780e9 100644 --- a/pkgs/development/ocaml-modules/rope/default.nix +++ b/pkgs/development/ocaml-modules/rope/default.nix @@ -6,7 +6,7 @@ let param = version = "0.6.2"; url = "https://github.com/Chris00/ocaml-rope/releases/download/${version}/rope-${version}.tbz"; sha256 = "15cvfa0s1vjx7gjd07d3fkznilishqf4z4h2q5f20wm9ysjh2h2i"; - buildInputs = [ dune_2 ]; + nativeBuildInputs = [ dune_2 ]; extra = { buildPhase = "dune build -p rope"; installPhase = '' @@ -17,7 +17,7 @@ let param = version = "0.5"; url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-0.5.tar.gz"; sha256 = "05fr2f5ch2rqhyaj06rv5218sbg99p1m9pq5sklk04hpslxig21f"; - buildInputs = [ ocamlbuild ]; + nativeBuildInputs = [ ocamlbuild ]; extra = { createFindlibDestdir = true; }; }; in @@ -30,7 +30,10 @@ stdenv.mkDerivation ({ inherit (param) url sha256; }; - buildInputs = [ ocaml findlib benchmark ] ++ param.buildInputs; + nativeBuildInputs = [ ocaml findlib ] ++ param.nativeBuildInputs; + buildInputs = [ benchmark ] ; + + strictDeps = true; meta = { homepage = "http://rope.forge.ocamlcore.org/"; diff --git a/pkgs/development/ocaml-modules/rresult/default.nix b/pkgs/development/ocaml-modules/rresult/default.nix index 1198ca957f01..cdc3a1dba68a 100644 --- a/pkgs/development/ocaml-modules/rresult/default.nix +++ b/pkgs/development/ocaml-modules/rresult/default.nix @@ -8,10 +8,13 @@ stdenv.mkDerivation rec { sha256 = "1k69a3gvrk7f2cshwjzvk7818f0bwxhacgd14wxy6d4gmrggci86"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; propagatedBuildInputs = [ result ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = { diff --git a/pkgs/development/ocaml-modules/sawja/default.nix b/pkgs/development/ocaml-modules/sawja/default.nix index 284ba97b9c70..3b0878155a53 100644 --- a/pkgs/development/ocaml-modules/sawja/default.nix +++ b/pkgs/development/ocaml-modules/sawja/default.nix @@ -23,9 +23,9 @@ stdenv.mkDerivation { sha256 = "sha256:0k51rscs9mdgpg3qn4cahql5ncdvlb207m015hr8v6r1vfgn0ddq"; }; - nativeBuildInputs = [ which ]; + nativeBuildInputs = [ which ocaml findlib ]; - buildInputs = [ ocaml findlib ]; + strictDeps = true; patches = [ ./configure.sh.patch ./Makefile.config.example.patch ]; diff --git a/pkgs/development/ocaml-modules/sedlex/default.nix b/pkgs/development/ocaml-modules/sedlex/default.nix index c1ea56b5c506..b808145bcbbc 100644 --- a/pkgs/development/ocaml-modules/sedlex/default.nix +++ b/pkgs/development/ocaml-modules/sedlex/default.nix @@ -15,10 +15,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-VhzlDTYBFXgKWT69PqZYLuHkiaDwzhmyX2XfaqzHFl4="; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; propagatedBuildInputs = [ gen ocaml-migrate-parsetree ppx_tools_versioned ]; + strictDeps = true; + buildFlags = [ "all" "opt" ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/sha/default.nix b/pkgs/development/ocaml-modules/sha/default.nix index c1a76e4149e6..4cbb658b6549 100644 --- a/pkgs/development/ocaml-modules/sha/default.nix +++ b/pkgs/development/ocaml-modules/sha/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, buildDunePackage, stdlib-shims, ounit }: +{ lib, fetchurl, buildDunePackage, stdlib-shims, dune-configurator, ounit }: buildDunePackage rec { pname = "sha"; @@ -11,6 +11,8 @@ buildDunePackage rec { useDune2 = true; + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ stdlib-shims ]; diff --git a/pkgs/development/ocaml-modules/sodium/default.nix b/pkgs/development/ocaml-modules/sodium/default.nix index cff3d6186d1a..040a34ef6f1d 100644 --- a/pkgs/development/ocaml-modules/sodium/default.nix +++ b/pkgs/development/ocaml-modules/sodium/default.nix @@ -16,9 +16,11 @@ stdenv.mkDerivation rec { ./lib-gen-link-bigarray.patch ]; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; propagatedBuildInputs = [ ctypes libsodium ]; + strictDeps = true; + createFindlibDestdir = true; hardeningDisable = lib.optional stdenv.isDarwin "strictoverflow"; diff --git a/pkgs/development/ocaml-modules/sosa/default.nix b/pkgs/development/ocaml-modules/sosa/default.nix index 1605a15bea8e..141e2a50193d 100644 --- a/pkgs/development/ocaml-modules/sosa/default.nix +++ b/pkgs/development/ocaml-modules/sosa/default.nix @@ -17,7 +17,9 @@ stdenv.mkDerivation rec { sha256 = "053hdv6ww0q4mivajj4iyp7krfvgq8zajq9d8x4mia4lid7j0dyk"; }; - buildInputs = [ ocaml ocamlbuild findlib ]; + nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + + strictDeps = true; buildPhase = "make build"; diff --git a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix index 02a281740b9f..6009eaecce1d 100644 --- a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix +++ b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix @@ -17,10 +17,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-pKysvth0efxJeyJQY2Dnqarg7OtsKyyLnFV/1ZhsfDY="; }; - buildInputs = [ ocaml findlib ocamlbuild twt ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ twt ]; propagatedBuildInputs = [ ocaml_sqlite3 ]; + strictDeps = true; + createFindlibDestdir = true; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/stdcompat/default.nix b/pkgs/development/ocaml-modules/stdcompat/default.nix index 0f3b5377fc51..eae9b264ba1f 100644 --- a/pkgs/development/ocaml-modules/stdcompat/default.nix +++ b/pkgs/development/ocaml-modules/stdcompat/default.nix @@ -11,7 +11,10 @@ stdenv.mkDerivation rec { sha256 = "sha256:01y67rndjlzfp5zq0gbqpg9skqq2hfbvhbq9lfhhk5xidr98sfj8"; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; + + strictDeps = true; + # build fails otherwise enableParallelBuilding = false; diff --git a/pkgs/development/ocaml-modules/tezos/legacy-store.nix b/pkgs/development/ocaml-modules/tezos/legacy-store.nix index 6029401e3618..b6d9f20df3c7 100644 --- a/pkgs/development/ocaml-modules/tezos/legacy-store.nix +++ b/pkgs/development/ocaml-modules/tezos/legacy-store.nix @@ -23,10 +23,12 @@ buildDunePackage { lwt-watcher ]; - buildInputs = [ + nativeBuildInputs = [ tezos-protocol-compiler ]; + strictDeps = true; + checkInputs = [ alcotest-lwt ]; diff --git a/pkgs/development/ocaml-modules/tezos/lmdb.nix b/pkgs/development/ocaml-modules/tezos/lmdb.nix index 6eaed942317f..5b5690707ab3 100644 --- a/pkgs/development/ocaml-modules/tezos/lmdb.nix +++ b/pkgs/development/ocaml-modules/tezos/lmdb.nix @@ -25,7 +25,7 @@ buildDunePackage { useDune2 = true; - buildInputs = [ + nativeBuildInputs = [ pkg-config ]; @@ -34,6 +34,8 @@ buildDunePackage { lmdb ]; + strictDeps = true; + checkInputs = [ cstruct alcotest diff --git a/pkgs/development/ocaml-modules/tezos/protocol-010-PtGRANAD.nix b/pkgs/development/ocaml-modules/tezos/protocol-010-PtGRANAD.nix index 2321245220f6..85dc33dc98f1 100644 --- a/pkgs/development/ocaml-modules/tezos/protocol-010-PtGRANAD.nix +++ b/pkgs/development/ocaml-modules/tezos/protocol-010-PtGRANAD.nix @@ -2,6 +2,7 @@ , buildDunePackage , tezos-stdlib , tezos-protocol-compiler +, tezos-protocol-environment }: buildDunePackage { @@ -9,10 +10,16 @@ buildDunePackage { inherit (tezos-stdlib) version useDune2; src = "${tezos-stdlib.base_src}/src"; - buildInputs = [ + nativeBuildInputs = [ tezos-protocol-compiler ]; + buildInputs = [ + tezos-protocol-environment + ]; + + strictDeps = true; + doCheck = true; meta = tezos-stdlib.meta // { diff --git a/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2.nix b/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2.nix index 2dec60851770..3cfb8cced04d 100644 --- a/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2.nix +++ b/pkgs/development/ocaml-modules/tezos/protocol-011-PtHangz2.nix @@ -2,6 +2,7 @@ , buildDunePackage , tezos-stdlib , tezos-protocol-compiler +, tezos-protocol-environment }: buildDunePackage { @@ -9,10 +10,16 @@ buildDunePackage { inherit (tezos-stdlib) version useDune2; src = "${tezos-stdlib.base_src}/src"; - buildInputs = [ + nativeBuildInputs = [ tezos-protocol-compiler ]; + buildInputs = [ + tezos-protocol-environment + ]; + + strictDeps = true; + doCheck = true; meta = tezos-stdlib.meta // { diff --git a/pkgs/development/ocaml-modules/tezos/store.nix b/pkgs/development/ocaml-modules/tezos/store.nix index 69dad7512707..3fbe945d07b7 100644 --- a/pkgs/development/ocaml-modules/tezos/store.nix +++ b/pkgs/development/ocaml-modules/tezos/store.nix @@ -31,10 +31,12 @@ buildDunePackage { tezos-legacy-store ]; - buildInputs = [ + nativeBuildInputs = [ tezos-protocol-compiler ]; + strictDeps = true; + checkInputs = [ alcotest-lwt ]; diff --git a/pkgs/development/ocaml-modules/tezos/validation.nix b/pkgs/development/ocaml-modules/tezos/validation.nix index b26b81f4a779..44a7576cc065 100644 --- a/pkgs/development/ocaml-modules/tezos/validation.nix +++ b/pkgs/development/ocaml-modules/tezos/validation.nix @@ -14,10 +14,12 @@ buildDunePackage { tezos-protocol-updater ]; - buildInputs = [ + nativeBuildInputs = [ tezos-protocol-compiler ]; + strictDeps = true; + doCheck = true; meta = tezos-stdlib.meta // { diff --git a/pkgs/development/ocaml-modules/toml/default.nix b/pkgs/development/ocaml-modules/toml/default.nix index 6980a148e105..dd765e388235 100644 --- a/pkgs/development/ocaml-modules/toml/default.nix +++ b/pkgs/development/ocaml-modules/toml/default.nix @@ -15,7 +15,7 @@ buildDunePackage rec { sha256 = "08ywzqckllvwawl1wpgg7qzvx6jhq7d6vysa0d5hj7qdwq213ggm"; }; - buildInputs = [ menhir ]; + nativeBuildInputs = [ menhir ]; propagatedBuildInputs = [ iso8601 ]; meta = { diff --git a/pkgs/development/ocaml-modules/topkg/default.nix b/pkgs/development/ocaml-modules/topkg/default.nix index 9e1369a8567b..10104228c839 100644 --- a/pkgs/development/ocaml-modules/topkg/default.nix +++ b/pkgs/development/ocaml-modules/topkg/default.nix @@ -38,6 +38,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ ocaml findlib ocamlbuild ]; propagatedBuildInputs = param.propagatedBuildInputs or []; + strictDeps = true; + buildPhase = "${run} build"; createFindlibDestdir = true; installPhase = "${opaline}/bin/opaline -prefix $out -libdir $OCAMLFIND_DESTDIR"; diff --git a/pkgs/development/ocaml-modules/tsdl/default.nix b/pkgs/development/ocaml-modules/tsdl/default.nix index 7c09e8cd9d7a..a56cccbe0717 100644 --- a/pkgs/development/ocaml-modules/tsdl/default.nix +++ b/pkgs/development/ocaml-modules/tsdl/default.nix @@ -18,8 +18,8 @@ stdenv.mkDerivation { sha256 = "1zwv0ixkigh1gzk5n49rwvz2f2m62jdkkqg40j7dclg4gri7691f"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ pkg-config ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; propagatedBuildInputs = [ SDL2 ctypes ]; preConfigure = '' diff --git a/pkgs/development/ocaml-modules/twt/default.nix b/pkgs/development/ocaml-modules/twt/default.nix index 407601c7a46c..4e76f0c16d38 100644 --- a/pkgs/development/ocaml-modules/twt/default.nix +++ b/pkgs/development/ocaml-modules/twt/default.nix @@ -11,7 +11,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-xbjLPd7P1KyuC3i6WHLBcdLwd14atcBsd5ER+l97KAk="; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; + + strictDeps = true; preInstall = '' mkdir -p $out/bin diff --git a/pkgs/development/ocaml-modules/type_conv/108.08.00.nix b/pkgs/development/ocaml-modules/type_conv/108.08.00.nix index 337874e11a94..fb3977223f7e 100644 --- a/pkgs/development/ocaml-modules/type_conv/108.08.00.nix +++ b/pkgs/development/ocaml-modules/type_conv/108.08.00.nix @@ -13,7 +13,10 @@ stdenv.mkDerivation rec { sha256 = "08ysikwwp69zvc147lzzg79nwlrzrk738rj0ggcfadi8h5il42sl"; }; - buildInputs = [ ocaml findlib camlp4 ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ camlp4 ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/type_conv/109.60.01.nix b/pkgs/development/ocaml-modules/type_conv/109.60.01.nix index 4ec160a92230..1f6500c6ed17 100644 --- a/pkgs/development/ocaml-modules/type_conv/109.60.01.nix +++ b/pkgs/development/ocaml-modules/type_conv/109.60.01.nix @@ -15,7 +15,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-8Oz/fPL3+RghyxQp5u6seSEdf0BgfP6XNcsMYty0rNs="; }; - buildInputs = [ ocaml findlib camlp4 ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ camlp4 ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/type_conv/112.01.01.nix b/pkgs/development/ocaml-modules/type_conv/112.01.01.nix index e90ca2d16a64..468b872ec3d0 100644 --- a/pkgs/development/ocaml-modules/type_conv/112.01.01.nix +++ b/pkgs/development/ocaml-modules/type_conv/112.01.01.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildOcaml}: +{ lib, fetchFromGitHub, buildOcaml, camlp4}: buildOcaml rec { minimumSupportedOcamlVersion = "4.02"; @@ -13,6 +13,10 @@ buildOcaml rec { sha256 = "sha256-HzH0hnceCQ2kDRATjl+tfKk3XSBDsGnPzVUGYpDQUmU="; }; + strictDeps = true; + + buildInputs = [ camlp4 ]; + meta = { homepage = "https://github.com/janestreet/type_conv/"; description = "Support library for preprocessor type conversions"; diff --git a/pkgs/development/ocaml-modules/uchar/default.nix b/pkgs/development/ocaml-modules/uchar/default.nix index 7d7d87af8532..09004e8a9438 100644 --- a/pkgs/development/ocaml-modules/uchar/default.nix +++ b/pkgs/development/ocaml-modules/uchar/default.nix @@ -10,7 +10,9 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ ocaml ocamlbuild findlib ]; - buildInputs = [ findlib ocaml ocamlbuild ]; + + strictDeps = true; + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${lib.boolToString withShared}"; installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR"; configurePlatforms = [ ]; diff --git a/pkgs/development/ocaml-modules/ulex/default.nix b/pkgs/development/ocaml-modules/ulex/default.nix index f1ada5d09981..9a5848db3f7b 100644 --- a/pkgs/development/ocaml-modules/ulex/default.nix +++ b/pkgs/development/ocaml-modules/ulex/default.nix @@ -25,8 +25,9 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; - buildInputs = [ ocaml findlib ocamlbuild ]; - propagatedBuildInputs = [ camlp4 ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ]; + + strictDeps = true; buildFlags = [ "all" "all.opt" ]; diff --git a/pkgs/development/ocaml-modules/uucd/default.nix b/pkgs/development/ocaml-modules/uucd/default.nix index 244f3f36dc39..0c71ddf0d700 100644 --- a/pkgs/development/ocaml-modules/uucd/default.nix +++ b/pkgs/development/ocaml-modules/uucd/default.nix @@ -13,7 +13,10 @@ stdenv.mkDerivation rec { sha256 = "sha256:0fc737v5gj3339jx4x9xr096lxrpwvp6vaiylhavcvsglcwbgm30"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; + + strictDeps = true; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/uucp/default.nix b/pkgs/development/ocaml-modules/uucp/default.nix index 2e8a360d4550..9031087f5053 100644 --- a/pkgs/development/ocaml-modules/uucp/default.nix +++ b/pkgs/development/ocaml-modules/uucp/default.nix @@ -21,10 +21,13 @@ stdenv.mkDerivation { sha256 = "sha256:1yx9nih3d9prb9zizq8fzmmqylf24a6yifhf81h33znrj5xn1mpj"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg uutf uunf ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg uutf uunf uucd ]; propagatedBuildInputs = [ uchar ]; + strictDeps = true; + buildPhase = '' runHook preBuild ${topkg.buildPhase} --with-cmdliner false --tests ${lib.boolToString doCheck} diff --git a/pkgs/development/ocaml-modules/uuidm/default.nix b/pkgs/development/ocaml-modules/uuidm/default.nix index b260a05505bc..336d66cb0a64 100644 --- a/pkgs/development/ocaml-modules/uuidm/default.nix +++ b/pkgs/development/ocaml-modules/uuidm/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8"; }; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; configurePlatforms = []; buildInputs = [ topkg cmdliner ]; diff --git a/pkgs/development/ocaml-modules/uunf/default.nix b/pkgs/development/ocaml-modules/uunf/default.nix index 073e6865fcdd..12031c53927c 100644 --- a/pkgs/development/ocaml-modules/uunf/default.nix +++ b/pkgs/development/ocaml-modules/uunf/default.nix @@ -18,10 +18,13 @@ stdenv.mkDerivation { sha256 = "sha256:17wv0nm3vvwcbzb1b09akw8jblmigyhbfmh1sy9lkb5756ni94a2"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg uutf cmdliner ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg uutf cmdliner ]; propagatedBuildInputs = [ uchar ]; + strictDeps = true; + prePatch = lib.optionalString stdenv.isAarch64 "ulimit -s 16384"; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/uuseg/default.nix b/pkgs/development/ocaml-modules/uuseg/default.nix index 1fbcb57f3a6a..42642d2dc24e 100644 --- a/pkgs/development/ocaml-modules/uuseg/default.nix +++ b/pkgs/development/ocaml-modules/uuseg/default.nix @@ -15,9 +15,12 @@ stdenv.mkDerivation rec { sha256 = "sha256:1g9zyzjkhqxgbb9mh3cgaawscwdazv6y8kdqvmy6yhnimmfqv25p"; }; - buildInputs = [ ocaml findlib ocamlbuild cmdliner topkg uutf ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg cmdliner uutf ]; propagatedBuildInputs = [ uucp ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/uutf/default.nix b/pkgs/development/ocaml-modules/uutf/default.nix index e8179e369afa..6701c8650513 100644 --- a/pkgs/development/ocaml-modules/uutf/default.nix +++ b/pkgs/development/ocaml-modules/uutf/default.nix @@ -13,10 +13,12 @@ stdenv.mkDerivation rec { sha256 = "1nx1rly3qj23jzn9yk3x6fwqimcxjd84kv5859vvhdg56psq26p6"; }; - nativeBuildInputs = [ ocaml ocamlbuild findlib ]; - buildInputs = [ findlib topkg cmdliner ]; + nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ]; + buildInputs = [ topkg cmdliner ]; propagatedBuildInputs = [ uchar ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/uuuu/default.nix b/pkgs/development/ocaml-modules/uuuu/default.nix index 7d2eaac181df..4f400d1ec75b 100644 --- a/pkgs/development/ocaml-modules/uuuu/default.nix +++ b/pkgs/development/ocaml-modules/uuuu/default.nix @@ -24,10 +24,12 @@ buildDunePackage rec { useDune2 = true; - nativeBuildInputs = [ menhir ]; + nativeBuildInputs = [ menhir findlib ]; buildInputs = [ angstrom ]; + strictDeps = !doCheck; + checkInputs = [ re ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/vg/default.nix b/pkgs/development/ocaml-modules/vg/default.nix index a9a4c0d3d6b4..9dc7a4eeeeff 100644 --- a/pkgs/development/ocaml-modules/vg/default.nix +++ b/pkgs/development/ocaml-modules/vg/default.nix @@ -28,12 +28,15 @@ stdenv.mkDerivation { sha256 = "181sz6l5xrj5jvwg4m2yqsjzwp2s5h8v0mwhjcwbam90kdfx2nak"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ topkg ]; propagatedBuildInputs = [ uchar result gg ] ++ optionals pdfBackend [ uutf otfm ] ++ optionals htmlcBackend [ js_of_ocaml js_of_ocaml-ppx ]; + strictDeps = true; + buildPhase = topkg.buildPhase + " --with-uutf ${boolToString pdfBackend}" + " --with-otfm ${boolToString pdfBackend}" diff --git a/pkgs/development/ocaml-modules/webbrowser/default.nix b/pkgs/development/ocaml-modules/webbrowser/default.nix index 6a21a1e1f751..a8adced93882 100644 --- a/pkgs/development/ocaml-modules/webbrowser/default.nix +++ b/pkgs/development/ocaml-modules/webbrowser/default.nix @@ -11,9 +11,11 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; - buildInputs = []; + buildInputs = [ topkg ]; propagatedBuildInputs = [ astring bos cmdliner rresult ]; + strictDeps = true; + inherit (topkg) buildPhase installPhase; meta = { diff --git a/pkgs/development/ocaml-modules/xml-light/default.nix b/pkgs/development/ocaml-modules/xml-light/default.nix index 683d2ec214f1..8eb700a4d14a 100644 --- a/pkgs/development/ocaml-modules/xml-light/default.nix +++ b/pkgs/development/ocaml-modules/xml-light/default.nix @@ -11,7 +11,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-2txmkl/ZN5RGaLQJmr+orqwB4CbFk2RpLJd4gr7kPiE="; }; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; + + strictDeps = true; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/xmlm/default.nix b/pkgs/development/ocaml-modules/xmlm/default.nix index 43b0bf5faa7e..f7aa1fdf113e 100644 --- a/pkgs/development/ocaml-modules/xmlm/default.nix +++ b/pkgs/development/ocaml-modules/xmlm/default.nix @@ -17,7 +17,10 @@ stdenv.mkDerivation rec { sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; + + strictDeps = true; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/z3/default.nix b/pkgs/development/ocaml-modules/z3/default.nix index 43fc5b245c8d..b17f29b43531 100644 --- a/pkgs/development/ocaml-modules/z3/default.nix +++ b/pkgs/development/ocaml-modules/z3/default.nix @@ -29,9 +29,11 @@ stdenv.mkDerivation { runHook postInstall ''; - buildInputs = [ findlib ]; + nativeBuildInputs = [ findlib ]; propagatedBuildInputs = [ zarith ]; + strictDeps = true; + meta = z3.meta // { description = "Z3 Theorem Prover (OCaml API)"; }; diff --git a/pkgs/development/tools/ocaml/camlidl/default.nix b/pkgs/development/tools/ocaml/camlidl/default.nix index 1c3da92273ce..5c3153a88493 100644 --- a/pkgs/development/tools/ocaml/camlidl/default.nix +++ b/pkgs/development/tools/ocaml/camlidl/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "0483cs66zsxsavcllpw1qqvyhxb39ddil3h72clcd69g7fyxazl5"; }; - buildInputs = [ ocaml ]; + nativeBuildInputs = [ ocaml ]; # build fails otherwise enableParallelBuilding = false; diff --git a/pkgs/development/tools/ocaml/merlin/4.x.nix b/pkgs/development/tools/ocaml/merlin/4.x.nix index 831360cd858d..2d030b2d1560 100644 --- a/pkgs/development/tools/ocaml/merlin/4.x.nix +++ b/pkgs/development/tools/ocaml/merlin/4.x.nix @@ -57,11 +57,19 @@ buildDunePackage { useDune2 = true; + strictDeps = true; + + nativeBuildInputs = [ + menhir + jq + ]; buildInputs = [ dot-merlin-reader yojson csexp result + menhirSdk + menhirLib ]; doCheck = true; @@ -71,12 +79,6 @@ buildDunePackage { dune runtest # filtering with -p disables tests runHook postCheck ''; - checkInputs = [ - jq - menhir - menhirLib - menhirSdk - ]; meta = with lib; { description = "An editor-independent tool to ease the development of programs in OCaml"; diff --git a/pkgs/development/tools/ocaml/merlin/default.nix b/pkgs/development/tools/ocaml/merlin/default.nix index 1c9b549d6120..3db5d1377831 100644 --- a/pkgs/development/tools/ocaml/merlin/default.nix +++ b/pkgs/development/tools/ocaml/merlin/default.nix @@ -1,5 +1,5 @@ { lib, fetchurl, buildDunePackage, substituteAll -, dot-merlin-reader, dune_2, yojson, csexp, result }: +, dot-merlin-reader, dune_2, yojson, csexp, result, menhirSdk }: buildDunePackage rec { pname = "merlin"; @@ -22,7 +22,9 @@ buildDunePackage rec { }) ]; - buildInputs = [ dot-merlin-reader yojson csexp result ]; + strictDeps = true; + + buildInputs = [ dot-merlin-reader yojson csexp result menhirSdk ]; meta = with lib; { description = "An editor-independent tool to ease the development of programs in OCaml"; diff --git a/pkgs/development/tools/ocaml/oasis/default.nix b/pkgs/development/tools/ocaml/oasis/default.nix index 10c7bf63aa41..d35ddbe210bf 100644 --- a/pkgs/development/tools/ocaml/oasis/default.nix +++ b/pkgs/development/tools/ocaml/oasis/default.nix @@ -13,11 +13,15 @@ stdenv.mkDerivation { createFindlibDestdir = true; - buildInputs = + strictDeps = true; + + nativeBuildInputs = [ ocaml findlib ocamlbuild ocamlmod ocamlify ]; + buildInputs = [ ocamlbuild ]; + configurePhase = '' runHook preConfigure ocaml setup.ml -configure --prefix $out diff --git a/pkgs/development/tools/ocaml/obelisk/default.nix b/pkgs/development/tools/ocaml/obelisk/default.nix index 0d92840a82be..a37a8c8b3927 100644 --- a/pkgs/development/tools/ocaml/obelisk/default.nix +++ b/pkgs/development/tools/ocaml/obelisk/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, ocamlPackages }: +{ lib, fetchFromGitHub, ocamlPackages, menhir }: ocamlPackages.buildDunePackage rec { pname = "obelisk"; @@ -11,7 +11,10 @@ ocamlPackages.buildDunePackage rec { sha256 = "1jjaqa2b7msl9qd3x7j34vdh1s9alq8hbvzk8a5srb4yyfyim15b"; }; - buildInputs = with ocamlPackages; [ menhir re ]; + strictDeps = true; + + nativeBuildInputs = [ menhir ]; + buildInputs = with ocamlPackages; [ re ]; meta = { description = "A simple tool which produces pretty-printed output from a Menhir parser file (.mly)"; diff --git a/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/pkgs/development/tools/ocaml/ocamlformat/generic.nix index 5686e33f9b73..7cd3196317fa 100644 --- a/pkgs/development/tools/ocaml/ocamlformat/generic.nix +++ b/pkgs/development/tools/ocaml/ocamlformat/generic.nix @@ -48,6 +48,12 @@ buildDunePackage { useDune2 = true; + strictDeps = true; + + nativeBuildInputs = [ + menhir + ]; + buildInputs = if lib.versionAtLeast version "0.20.0" then [ @@ -57,7 +63,6 @@ buildDunePackage { either fix fpath - menhir menhirLib menhirSdk ocaml-version @@ -78,7 +83,6 @@ buildDunePackage { uuseg uutf fix - menhir menhirLib menhirSdk ocp-indent @@ -96,7 +100,6 @@ buildDunePackage { uuseg uutf fix - menhir menhirLib menhirSdk dune-build-info @@ -115,7 +118,6 @@ buildDunePackage { uuseg uutf fix - menhir menhirLib menhirSdk dune-build-info @@ -135,7 +137,6 @@ buildDunePackage { uuseg uutf fix - menhir menhirLib menhirSdk (ppxlib.override { version = "0.18.0"; }) @@ -154,7 +155,6 @@ buildDunePackage { uuseg uutf fix - menhir menhirLib menhirSdk ] else [ diff --git a/pkgs/development/tools/ocaml/ocp-index/default.nix b/pkgs/development/tools/ocaml/ocp-index/default.nix index 716e2679a94a..1ca8cfb5c52c 100644 --- a/pkgs/development/tools/ocaml/ocp-index/default.nix +++ b/pkgs/development/tools/ocaml/ocp-index/default.nix @@ -13,7 +13,10 @@ buildDunePackage rec { sha256 = "120w72fqymjp6ibicbp31jyx9yv34mdvgkr0zdfpzvfb7lgd8rc7"; }; - buildInputs = [ cppo cmdliner re ]; + strictDeps = true; + + nativeBuildInputs = [ cppo ]; + buildInputs = [ cmdliner re ]; propagatedBuildInputs = [ ocp-indent ]; diff --git a/pkgs/development/tools/ocaml/utop/default.nix b/pkgs/development/tools/ocaml/utop/default.nix index 913871314cfe..a31b6f6f6f9e 100644 --- a/pkgs/development/tools/ocaml/utop/default.nix +++ b/pkgs/development/tools/ocaml/utop/default.nix @@ -17,8 +17,7 @@ buildDunePackage rec { sha256 = "0mi571ifjzq4wcjarn8q1b7yl8nxjm1jfx3afac224lqwn6bhb2d"; }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ cppo ]; + nativeBuildInputs = [ makeWrapper cppo ]; propagatedBuildInputs = [ lambdaTerm ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 247298df58e6..dfab30d58f06 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15322,7 +15322,7 @@ with pkgs; nrfutil = callPackage ../development/tools/misc/nrfutil { }; - obelisk = callPackage ../development/tools/ocaml/obelisk { }; + obelisk = callPackage ../development/tools/ocaml/obelisk { menhir = ocamlPackages.menhir; }; obuild = callPackage ../development/tools/ocaml/obuild { };