Skip to content

Commit

Permalink
ocamlPackages treewide: strictDeps all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrikstrid committed Feb 3, 2023
1 parent d6ccd76 commit c53a63a
Show file tree
Hide file tree
Showing 250 changed files with 659 additions and 406 deletions.
3 changes: 2 additions & 1 deletion pkgs/applications/misc/orpie/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ ocamlPackages.buildDunePackage rec {
substituteInPlace src/orpie/install.ml.in --replace '@prefix@' $out
'';

buildInputs = with ocamlPackages; [ curses camlp5 num gsl ];
nativeBuildInputs = [ ocamlPackages.camlp5 ];
buildInputs = with ocamlPackages; [ curses num gsl ];

meta = {
inherit (src.meta) homepage;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/applications/misc/stog/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ buildDunePackage rec {
sha256 = "sha256:0krj5w4y05bcfx7hk9blmap8avl31gp7yi01lpqzs6ync23mvm0x";
};

buildInputs = [ fmt lwt_ppx menhir ocf_ppx ppx_blob xtmpl_ppx ];
nativeBuildInputs = [ menhir ];
buildInputs = [ fmt lwt_ppx ocf_ppx ppx_blob xtmpl_ppx ];
propagatedBuildInputs = [
dune-build-info
dune-site
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildDunePackage rec {
};

doCheck = true;
nativeCheckInputs = [ ounit2 ];
checkInputs = [ ounit2 ];

buildInputs = [ extlib ocamlfuse gapi-ocaml ocaml_sqlite3 tiny_httpd ];

Expand Down
16 changes: 12 additions & 4 deletions pkgs/applications/science/logic/acgtk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@ stdenv.mkDerivation {
sha256 = "sha256-W/BDhbng5iYuiB7desMKvRtDFdhoaxiJNvNvtbLlA6E=";
};

buildInputs = [ dune_2 ] ++ (with ocamlPackages; [
ocaml findlib ansiterminal cairo2 cmdliner fmt logs menhir menhirLib mtime sedlex yojson
]);
strictDeps = true;

buildPhase = "dune build --profile=release";
nativeBuildInputs = with ocamlPackages; [ menhir ocaml findlib dune_2 ];

buildInputs = with ocamlPackages; [
ansiterminal cairo2 cmdliner fmt logs menhirLib mtime sedlex yojson
];

buildPhase = ''
runHook preBuild
dune build --profile=release ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
runHook postBuild
'';

installPhase = ''
dune install --prefix $out --libdir $OCAMLFIND_DESTDIR
Expand Down
5 changes: 3 additions & 2 deletions pkgs/applications/science/logic/z3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ let common = { version, sha256, patches ? [ ] }:
nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ python ]
++ optional javaBindings jdk
++ optionals ocamlBindings [ ocaml findlib zarith ]
++ optionals ocamlBindings [ ocaml findlib ]
;
propagatedBuildInputs = [ python.pkgs.setuptools ];
propagatedBuildInputs = [ python.pkgs.setuptools ]
++ optionals ocamlBindings [ zarith ];
enableParallelBuilding = true;

postPatch = optionalString ocamlBindings ''
Expand Down
2 changes: 2 additions & 0 deletions pkgs/applications/virtualization/virt-top/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
hash = "sha256-IKIkqzx7YWki0L6D5WbwQiVWJfDFGdI2nsGgg212CcE=";
};

strictDeps = true;

nativeBuildInputs = [
autoreconfHook
pkg-config
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/ocaml/dune.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stdenv.mkDerivation ({
runHook postInstall
'';

} // (builtins.removeAttrs args [ "minimalOCamlVersion" "duneVersion" ]) // {
} // (builtins.removeAttrs args [ "minimalOCamlVersion" "duneVersion" ]) // {

name = "ocaml${ocaml.version}-${pname}-${version}";

Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/compilers/stanc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ ocamlPackages.buildDunePackage rec {
--replace "if Sys.file_exists (to_windows path) then to_windows cmd else cmd" "cmd"
'';

nativeBuildInputs = with ocamlPackages; [
menhir
];
buildInputs = with ocamlPackages; [
core_unix
menhir
menhirLib
ppx_deriving
fmt
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/ocaml-modules/afl-persistent/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i";
};

strictDeps = true;

nativeBuildInputs = [ ocaml findlib ];

# don't run tests in buildPhase
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/alcotest/lwt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildDunePackage {
propagatedBuildInputs = [ alcotest logs lwt fmt ];

doCheck = true;
nativeCheckInputs = [ re cmdliner ];
checkInputs = [ re cmdliner ];

meta = alcotest.meta // {
description = "Lwt-based helpers for Alcotest";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/angstrom/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildDunePackage rec {
sha256 = "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh";
};

nativeCheckInputs = [ alcotest ppx_let ];
checkInputs = [ alcotest ppx_let ];
buildInputs = [ ocaml-syntax-shims ];
propagatedBuildInputs = [ bigstringaf result ];
doCheck = lib.versionAtLeast ocaml.version "4.08";
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/ocaml-modules/apron/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gmp mpfr ppl camlidl ];
propagatedBuildInputs = [ mlgmpidl ];

# TODO: Doesn't produce the library correctly if true
strictDeps = false;

outputs = [ "out" "bin" "dev" ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/arp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ buildDunePackage rec {
];

doCheck = true;
nativeCheckInputs = [
checkInputs = [
alcotest
mirage-clock-unix
mirage-profile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildDunePackage rec {
propagatedBuildInputs = [ cstruct zarith bigarray-compat stdlib-shims ptime ];

doCheck = true;
nativeCheckInputs = [ alcotest ];
checkInputs = [ alcotest ];

meta = with lib; {
homepage = "https://github.com/mirleft/ocaml-asn1-combinators";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/ocaml-modules/atdgen/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ buildDunePackage {

propagatedBuildInputs = [ atdgen-runtime ];

strictDeps = true;
doCheck = true;
nativeCheckInputs = [ alcotest atdgen-codec-runtime
(python3.withPackages (ps: [ ps.jsonschema ]))
];
nativeCheckInputs = [ atd (python3.withPackages (ps: [ ps.jsonschema ]))];
checkInputs = [ alcotest atdgen-codec-runtime ];

meta = (builtins.removeAttrs atd.meta [ "mainProgram" ]) // {
description = "Generates efficient JSON serializers, deserializers and validators";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/ocaml-modules/awa/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ buildDunePackage rec {
hash = "sha256-ae1gTx3Emmkof/2Gnhq0d5RyfkFx21hHkVEVgyPdXuo=";
};

nativeBuildInputs = [ ppx_cstruct ];

propagatedBuildInputs = [
mirage-crypto mirage-crypto-ec mirage-crypto-rng mirage-crypto-pk x509
cstruct cstruct-sexp sexplib mtime
logs base64 zarith
ppx_sexp_conv eqaf
];

buildInputs = [ ppx_cstruct ];

doCheck = true;
nativeCheckInputs = [ cstruct-unix cmdliner fmt ];
checkInputs = [ cstruct-unix cmdliner fmt ];

meta = with lib; {
description = "SSH implementation in OCaml";
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/ocaml-modules/awa/lwt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ buildDunePackage {
];

doCheck = true;
nativeCheckInputs = [ cstruct-unix ];
nativeCheckInputs = [ awa ];
checkInputs = [ cstruct-unix ];

meta = awa.meta // { mainProgram = "awa_lwt_server"; };
}
3 changes: 2 additions & 1 deletion pkgs/development/ocaml-modules/bap/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ which makeWrapper ocaml findlib ocamlbuild ocaml_oasis ];

buildInputs = [ linenoise
buildInputs = [ ocamlbuild
linenoise
ounit
ppx_bitstring
z3
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/ocaml-modules/base64/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ buildDunePackage rec {
sha256 = "sha256-WJ3pwAV46/54QZismBjTWGxHSyMWts0+HEbMsfYq46Q=";
};

propagatedBuildInputs = [ findlib ];
nativeBuildInputs = [ findlib ];

# otherwise fmt breaks evaluation
doCheck = lib.versionAtLeast ocaml.version "4.08";
nativeCheckInputs = [ alcotest bos rresult ];
checkInputs = [ alcotest bos rresult ];

meta = {
homepage = "https://github.com/mirage/ocaml-base64";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/ocaml-modules/benchmark/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ stdenv.mkDerivation rec {
sha256 = "16wi8ld7c3mq77ylpgbnj8qqqqimyzwxs47v06vyrwpma5pab5xa";
};

strictDeps = true;

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

strictDeps = true;

createFindlibDestdir = true;

meta = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/bheap/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildDunePackage rec {
useDune2 = true;

doCheck = true;
nativeCheckInputs = [
checkInputs = [
stdlib-shims
];

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

strictDeps = !doCheck;
strictDeps = true;

propagatedBuildInputs = [ bigarray-compat ];

nativeBuildInputs = [ findlib pkg-config ];
nativeCheckInputs = [ alcotest astring fpath bos ];
checkInputs = [ alcotest astring fpath bos ];
doCheck = lib.versionAtLeast ocaml.version "4.08";

meta = with lib; {
Expand Down
5 changes: 1 addition & 4 deletions pkgs/development/ocaml-modules/bigstringaf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ buildDunePackage rec {
sha256 = "sha256-HXPjnE56auy2MI6HV2XuBX/VeqsO50HFzTul17lKEqE=";
};

# This currently fails with dune
strictDeps = false;

nativeBuildInputs = [ pkg-config ];
nativeCheckInputs = [ alcotest ];
checkInputs = [ alcotest ];
doCheck = true;

meta = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/bindlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buildDunePackage rec {
hash = "sha256-058yMbz9ExvgNG/kY9tPk70XSeVRSSKVg4n4F4fmPu4=";
};

nativeCheckInputs = [ earley timed ];
checkInputs = [ earley timed ];
doCheck = true;

meta = with lib; {
Expand Down
9 changes: 5 additions & 4 deletions pkgs/development/ocaml-modules/biocaml/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib, buildDunePackage, fetchFromGitHub, fetchpatch
, ounit, async, base64, camlzip, cfstream
, core, ppx_jane, ppx_sexp_conv, rresult, uri, xmlm }:
, core, ppx_jane, ppx_sexp_conv, rresult, uri, xmlm
}:

buildDunePackage rec {
pname = "biocaml";
Expand All @@ -10,8 +11,8 @@ buildDunePackage rec {

src = fetchFromGitHub {
owner = "biocaml";
repo = pname;
rev = "v${version}";
repo = pname;
rev = "v${version}";
sha256 = "01yw12yixs45ya1scpb9jy2f7dw1mbj7741xib2xpq3kkc1hc21s";
};

Expand All @@ -21,7 +22,7 @@ buildDunePackage rec {
};

buildInputs = [ ppx_jane ppx_sexp_conv ];
nativeCheckInputs = [ ounit ];
checkInputs = [ ounit ];
propagatedBuildInputs = [ async base64 camlzip cfstream core rresult uri xmlm ];

meta = with lib; {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/bitstring/ppx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildDunePackage rec {
buildInputs = [ bitstring ppxlib ];

doCheck = lib.versionAtLeast ocaml.version "4.08";
nativeCheckInputs = [ ounit ];
checkInputs = [ ounit ];

meta = bitstring.meta // {
description = "Bitstrings and bitstring matching for OCaml - PPX extension";
Expand Down
20 changes: 10 additions & 10 deletions pkgs/development/ocaml-modules/bls12-381-signature/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
lib,
fetchzip,
buildDunePackage,
bls12-381,
alcotest,
bisect_ppx,
integers_stubs_js,
{ lib
, fetchzip
, buildDunePackage
, bls12-381
, alcotest
, bisect_ppx
, integers_stubs_js
,
}:

buildDunePackage rec {
Expand All @@ -20,14 +20,14 @@ buildDunePackage rec {

propagatedBuildInputs = [ bls12-381 ];

nativeCheckInputs = [alcotest bisect_ppx integers_stubs_js];
checkInputs = [ alcotest bisect_ppx integers_stubs_js ];

doCheck = true;

meta = {
description = "Implementation of BLS signatures for the pairing-friendly curve BLS12-381";
license = lib.licenses.mit;
homepage = "https://gitlab.com/nomadic-labs/cryptography/ocaml-bls12-381-signature";
maintainers = [lib.maintainers.ulrikstrid];
maintainers = [ lib.maintainers.ulrikstrid ];
};
}
5 changes: 3 additions & 2 deletions pkgs/development/ocaml-modules/bls12-381/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib, buildDunePackage, fetchFromGitLab
, ff-sig, zarith, zarith_stubs_js, integers_stubs_js, integers, hex
, alcotest, ff-pbt }:
, alcotest, ff-pbt
}:

buildDunePackage rec {
pname = "bls12-381";
Expand All @@ -23,7 +24,7 @@ buildDunePackage rec {
hex
];

nativeCheckInputs = [ alcotest ff-pbt ];
checkInputs = [ alcotest ff-pbt ];

doCheck = true;

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/bls12-381/legacy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ buildDunePackage rec {
zarith
];

nativeCheckInputs = [
checkInputs = [
alcotest
];

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/bwd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildDunePackage rec {
};

doCheck = true;
nativeCheckInputs = [ qcheck-core ];
checkInputs = [ qcheck-core ];

meta = {
description = "Backward Lists";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/ca-certs-nss/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ buildDunePackage rec {
];

doCheck = true;
nativeCheckInputs = [ alcotest ];
checkInputs = [ alcotest ];

meta = with lib; {
description = "X.509 trust anchors extracted from Mozilla's NSS";
Expand Down
Loading

0 comments on commit c53a63a

Please sign in to comment.