Skip to content

Commit

Permalink
treewide: add strictDeps = true to most packages depending on ocaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrikstrid committed Feb 3, 2023
1 parent c53a63a commit 376e9ce
Show file tree
Hide file tree
Showing 35 changed files with 187 additions and 123 deletions.
6 changes: 4 additions & 2 deletions pkgs/applications/misc/llpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ stdenv.mkDerivation rec {
src = ./fix-build-bash.patch;
});

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ ocaml mupdf libX11 libGLU libGL freetype zlib gumbo jbig2dec openjpeg libjpeg lcms2 harfbuzz ];
strictDeps = true;

nativeBuildInputs = [ makeWrapper ocaml ];
buildInputs = [ mupdf libX11 libGLU libGL freetype zlib gumbo jbig2dec openjpeg libjpeg lcms2 harfbuzz ];

dontStrip = true;

Expand Down
10 changes: 3 additions & 7 deletions pkgs/applications/networking/p2p/mldonkey/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,9 @@ stdenv.mkDerivation rec {
'${ocamlPackages.camlp4}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/camlp4'
'';

buildInputs = (with ocamlPackages; [
ocaml
camlp4
num
]) ++ [
zlib
];
strictDeps = true;
nativeBuildInputs = with ocamlPackages; [ ocaml camlp4];
buildInputs = (with ocamlPackages; [ num ]) ++ [ zlib ];

meta = {
broken = stdenv.isDarwin;
Expand Down
6 changes: 4 additions & 2 deletions pkgs/applications/networking/sync/unison/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-taA8eZ/wOe9uMccXVYfe34/XzWgqYKA3tLZnIOahOrQ=";
};

nativeBuildInputs = [ makeWrapper ]
strictDeps = true;

nativeBuildInputs = [ makeWrapper ocamlPackages.ocaml ]
++ lib.optional enableX11 copyDesktopItems;
buildInputs = [ ocamlPackages.ocaml ncurses ];
buildInputs = [ ncurses ];

preBuild = lib.optionalString enableX11 ''
sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)|" src/Makefile.OCaml
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/science/logic/abella/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256-/eOiebMFHgrurtrSHPlgZO3xmmxBOUmyAzswXZLd3Yc=";
};

buildInputs = [ rsync ] ++ (with ocamlPackages; [ ocaml ocamlbuild findlib ]);
strictDeps = true;

nativeBuildInputs = [ rsync ] ++ (with ocamlPackages; [ ocaml ocamlbuild findlib ]);

installPhase = ''
mkdir -p $out/bin
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/science/logic/cryptoverif/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256-F5eVN5ATYo9Ivpi2eYh96ktuTWUeoqgWMR4BqHu8EFs=";
};

buildInputs = [ ocaml ];
strictDeps = true;

nativeBuildInputs = [ ocaml ];

/* Fix up the frontend to load the 'default' cryptoverif library
** from under $out/libexec. By default, it expects to find the files
Expand Down
6 changes: 2 additions & 4 deletions pkgs/applications/science/logic/ekrhyper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-fEe0DIMGj7wO+79/BZf45kykgyTXpbZJsyFSt31XqpM=";
};

buildInputs = [
ocaml
perl
];
strictDeps = true;
nativeBuildInputs = [ ocaml perl ];
setSourceRoot = "export sourceRoot=$(echo */ekrh/src/)";
preInstall = "export INSTALLDIR=$out";
postInstall = ''for i in "$out/casc"/*; do ln -s "$i" "$out/bin/ekrh-casc-$(basename $i)"; done '';
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/science/logic/hol_light/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ stdenv.mkDerivation {
})
];

buildInputs = [ ocaml camlp5 ];
strictDeps = true;

nativeBuildInputs = [ ocaml camlp5 ];
propagatedBuildInputs = [ num ];

installPhase = ''
Expand Down
5 changes: 4 additions & 1 deletion pkgs/applications/science/logic/iprover/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "0lik8p7ayhjwpkln1iwf0ri84ramhch74j5nj6z7ph6wfi92pgg8";
};

buildInputs = [ ocaml eprover zlib ];
strictDeps = true;

nativeBuildInputs = [ ocaml eprover ];
buildInputs = [ zlib ];

preConfigure = "patchShebangs .";

Expand Down
6 changes: 4 additions & 2 deletions pkgs/applications/science/logic/leo2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "sha256:1b2q7vsz6s9ighypsigqjm1mzjiq3xgnz5id5ssb4rh9zm190r82";
};

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ eprover ocaml camlp4 perl zlib ];
strictDeps = true;

nativeBuildInputs = [ makeWrapper eprover ocaml camlp4 perl ];
buildInputs = [ zlib ];

patches = [ (fetchpatch {
url = "https://github.com/niklasso/minisat/commit/7eb6015313561a2586032574788fcb133eeaa19f.patch";
Expand Down
7 changes: 5 additions & 2 deletions pkgs/applications/science/logic/ott/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ stdenv.mkDerivation rec {
hash = "sha256-GzeEiok5kigcmfqf/K/UxvlKkl55zy0vOyiRZ2HyMiE=";
};

nativeBuildInputs = [ pkg-config opaline ];
buildInputs = with ocamlPackages; [ ocaml findlib ocamlgraph ];

strictDeps = true;

nativeBuildInputs = [ pkg-config opaline ] ++ (with ocamlPackages; [ findlib ocaml ]);
buildInputs = with ocamlPackages; [ ocamlgraph ];

installTargets = "ott.install";

Expand Down
7 changes: 4 additions & 3 deletions pkgs/applications/science/logic/prooftree/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "0z1z4wqbqwgppkh2bm89fgy07a0y2m6g4lvcyzs09sm1ysklk2dh";
};

nativeBuildInputs = [ pkg-config ];
buildInputs = [ ncurses ] ++ (with ocamlPackages; [
ocaml findlib camlp5 lablgtk ]);
strictDeps = true;

nativeBuildInputs = [ pkg-config ] ++ (with ocamlPackages; [ ocaml findlib camlp5 ]);
buildInputs = [ ncurses ] ++ (with ocamlPackages; [ lablgtk ]);

dontAddPrefix = true;
configureFlags = [ "--prefix" "$(out)" ];
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/science/logic/proverif/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256:0xgwnp59779xc40sb7ck8rmfn620pilxyq79l3bymj9m7z0mwvm9";
};

buildInputs = with ocamlPackages; [ ocaml findlib ];
strictDeps = true;

nativeBuildInputs = with ocamlPackages; [ ocaml findlib ];

buildPhase = "./build -nointeract";
installPhase = ''
Expand Down
7 changes: 5 additions & 2 deletions pkgs/applications/science/logic/satallax/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ stdenv.mkDerivation rec {
pname = "satallax";
version = "2.7";

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ ocaml zlib which eprover coq ];
strictDeps = true;

nativeBuildInputs = [ makeWrapper ocaml which eprover coq ];
buildInputs = [ zlib ];

src = fetchurl {
url = "https://www.ps.uni-saarland.de/~cebrown/satallax/downloads/${pname}-${version}.tar.gz";
sha256 = "1kvxn8mc35igk4vigi5cp7w3wpxk2z3bgwllfm4n3h2jfs0vkpib";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/science/logic/statverif/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ stdenv.mkDerivation rec {
sha256 = "113jjhi1qkcggbsmbw8fa9ln8vs7vy2r288szks7rn0jjn0wxmbw";
};

buildInputs = [ ocaml ];
strictDeps = true;

nativeBuildInputs = [ ocaml ];

patchPhase = "patch -p1 < ${pf-patch}";
buildPhase = "./build";
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/science/logic/tlaplus/tlaps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ stdenv.mkDerivation rec {
sha256 = "c296998acd14d5b93a8d5be7ee178007ef179957465966576bda26944b1b7fca";
};

buildInputs = [ ocaml isabelle cvc3 perl wget which ];
strictDeps = true;

nativeBuildInputs = [ ocaml isabelle cvc3 perl wget which ];

installPhase = ''
mkdir -pv "$out"
Expand Down
10 changes: 9 additions & 1 deletion pkgs/applications/science/logic/why3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ stdenv.mkDerivation rec {
sha256 = "sha256-vNR7WeiSvg+763GcovoZBFDfncekJMeqNegP4fVw06I=";
};

strictDeps = true;

nativeBuildInputs = with ocamlPackages; [
ocaml findlib menhir
# Coq Support
coqPackages.coq
];

buildInputs = with ocamlPackages; [
ocaml findlib ocamlgraph zarith menhir
ocamlgraph zarith
# Emacs compilation of why3.el
emacs
# Documentation
Expand Down
6 changes: 4 additions & 2 deletions pkgs/applications/science/logic/z3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ let common = { version, sha256, patches ? [ ] }:
sha256 = sha256;
};

nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ python ]
strictDeps = true;

nativeBuildInputs = [ python ]
++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames
++ optional javaBindings jdk
++ optionals ocamlBindings [ ocaml findlib ]
;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/version-management/monotone-viz/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
version = "1.0.2";
pname = "monotone-viz";

nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [ocaml lablgtk libgnomecanvas glib graphviz_2_0 camlp4];
nativeBuildInputs = [ pkg-config makeWrapper ocaml camlp4 ];
buildInputs = [ lablgtk libgnomecanvas glib graphviz_2_0 ];
src = fetchurl {
url = "http://oandrieu.nerim.net/monotone-viz/${pname}-${version}-nolablgtk.tar.gz";
sha256 = "1l5x4xqz5g1aaqbc1x80mg0yzkiah9ma9k9mivmn08alkjlakkdk";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/virtualization/virt-top/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ stdenv.mkDerivation rec {
autoreconfHook
pkg-config
getopt
ocamlPackages.ocaml
ocamlPackages.findlib
];

buildInputs = with ocamlPackages; [
ocamlPackages.ocaml
calendar
curses
findlib
gettext-stub
ocaml
ocaml_libvirt
] ++ [ libxml2 ];

Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/mezzo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ stdenv.mkDerivation {
sha256 = "0yck5r6di0935s3iy2mm9538jkf77ssr789qb06ms7sivd7g3ip6";
};

buildInputs = [ ocaml findlib ocamlbuild yojson menhir menhirLib ulex pprint fix functory ];
strictDeps = true;

nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ yojson menhir menhirLib ulex pprint fix functory ];

# Sets warning 3 as non-fatal
prePatch = lib.optionalString (check-ocaml-version "4.02") ''
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/obliv-c/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{ lib, stdenv, libgcrypt, fetchFromGitHub, ocamlPackages, perl }:
stdenv.mkDerivation rec {
pname = "obliv-c";

version = "0.0pre20210621";
buildInputs = [ perl ]

strictDeps = true;
nativeBuildInputs = [ perl ]
++ (with ocamlPackages; [ ocaml findlib ocamlbuild ]);
propagatedBuildInputs = [ libgcrypt ];
src = fetchFromGitHub {
Expand Down
11 changes: 6 additions & 5 deletions pkgs/development/compilers/reason/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@ stdenv.mkDerivation rec {
sha256 = "sha256-etzEXbILje+CrfJxIhH7jthEMoSJdS6O33QoG8HrLvI=";
};

strictDeps = true;
nativeBuildInputs = [
makeWrapper
menhir
];

buildInputs = [
ocaml
menhir
cppo
dune_3
findlib
];

buildInputs = [
fix
menhir
menhirSdk
ocaml
ppxlib
utop
] ++ lib.optional (lib.versionOlder ocaml.version "4.07") ncurses;
Expand Down
6 changes: 4 additions & 2 deletions pkgs/development/coq-modules/compcert/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ let compcert = mkCoqDerivation rec {
"3.11".sha256 = "sha256-ZISs/ZAJVWtxp9+Sg5qV5Rss1gI9hK769GnBfawLa6A=";
};

nativeBuildInputs = [ makeWrapper ];
buildInputs = with ocamlPackages; [ ocaml findlib menhir menhirLib ] ++ [ coq coq2html ];
strictDeps = true;

nativeBuildInputs = with ocamlPackages; [ makeWrapper ocaml findlib menhir coq coq2html ];
buildInputs = with ocamlPackages; [ menhirLib ];
propagatedBuildInputs = [ flocq ];

enableParallelBuilding = true;
Expand Down
8 changes: 6 additions & 2 deletions pkgs/development/interpreters/eff/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ stdenv.mkDerivation rec {
substituteInPlace setup.ml --replace js_of_ocaml.ocamlbuild js_of_ocaml-ocamlbuild
'';

buildInputs = [ which ] ++ (with ocamlPackages; [
ocaml findlib ocamlbuild menhir js_of_ocaml js_of_ocaml-ocamlbuild
strictDeps = true;

nativeBuildInputs = [ which ] ++ (with ocamlPackages; [
ocaml findlib ocamlbuild menhir
]);

buildInputs = with ocamlPackages; [ js_of_ocaml js_of_ocaml-ocamlbuild ];

doCheck = true;
checkTarget = "test";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/ocaml-gettext/stub.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildDunePackage rec {

doCheck = true;

nativeCheckInputs = [ ounit ];
checkInputs = [ ounit ];

meta = builtins.removeAttrs ocaml_gettext.meta [ "mainProgram" ];
}
4 changes: 1 addition & 3 deletions pkgs/development/ocaml-modules/ppx_import/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ buildDunePackage rec {
pname = "ppx_import";
inherit version;

useDune2 = true;

minimalOCamlVersion = "4.05";

src = fetchurl {
Expand All @@ -38,7 +36,7 @@ buildDunePackage rec {
ppxlib
];

nativeCheckInputs = [
checkInputs = [
ounit
ppx_deriving
ppx_sexp_conv
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/tools/analysis/flow/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ stdenv.mkDerivation rec {
install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow
'';

buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml-migrate-parsetree-2 dtoa fileutils core_kernel sedlex ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec visitors wtf8 ])
strictDeps = true;

nativeBuildInputs = with ocamlPackages; [ ocaml findlib ocamlbuild ];
buildInputs = with ocamlPackages; [ ocaml-migrate-parsetree-2 dtoa fileutils core_kernel sedlex ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec visitors wtf8 ]
++ lib.optionals stdenv.isDarwin [ CoreServices ];

meta = with lib; {
Expand Down
7 changes: 4 additions & 3 deletions pkgs/development/tools/analysis/frama-c/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ stdenv.mkDerivation rec {
};

preConfigure = lib.optionalString stdenv.cc.isClang "configureFlagsArray=(\"--with-cpp=clang -E -C\")";

postConfigure = "patchShebangs src/plugins/value/gen-api.sh";

nativeBuildInputs = [ autoconf wrapGAppsHook ];
strictDeps = true;

nativeBuildInputs = [ autoconf wrapGAppsHook ] ++ (with ocamlPackages; [ ocaml findlib ]);

buildInputs = with ocamlPackages; [
ncurses ocaml findlib ltl2ba ocamlgraph yojson menhirLib camlzip
ncurses ltl2ba ocamlgraph yojson menhirLib camlzip
lablgtk3 lablgtk3-sourceview3 coq graphviz zarith apron why3 mlgmpidl doxygen
ppx_deriving ppx_import
gdk-pixbuf
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/tools/java/sawjap/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ stdenv.mkDerivation {

prePatch = "cd test";

buildInputs = [ ocaml findlib sawja ];
strictDeps = true;

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

buildPhase = ''
runHook preBuild
Expand Down
Loading

0 comments on commit 376e9ce

Please sign in to comment.