diff options
author | Guillaume Girol <symphorien+git@xlumurb.eu> | 2021-08-14 12:00:00 +0000 |
---|---|---|
committer | Guillaume Girol <symphorien+git@xlumurb.eu> | 2021-08-19 09:32:03 +0200 |
commit | a17fc0337522b002166730d94e32f3b1517e0817 (patch) | |
tree | 5cbe21c28102d10f92366b09d460e81f1aa84de2 | |
parent | 41e07ee477012daa36857027695a377046ba3369 (diff) | |
download | nixlib-a17fc0337522b002166730d94e32f3b1517e0817.tar nixlib-a17fc0337522b002166730d94e32f3b1517e0817.tar.gz nixlib-a17fc0337522b002166730d94e32f3b1517e0817.tar.bz2 nixlib-a17fc0337522b002166730d94e32f3b1517e0817.tar.lz nixlib-a17fc0337522b002166730d94e32f3b1517e0817.tar.xz nixlib-a17fc0337522b002166730d94e32f3b1517e0817.tar.zst nixlib-a17fc0337522b002166730d94e32f3b1517e0817.zip |
pkgsStatic.ocaml-ng: migrate static adapter to derivations themselves
-rw-r--r-- | pkgs/build-support/ocaml/dune.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/bolt/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/hacl-star/raw.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/janestreet/js-build-tools.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/javalib/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/labltk/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/ocamlnet/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/ocsigen-server/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/sawja/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/zarith/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/dune/1.nix | 2 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/dune/2.nix | 2 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/findlib/default.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/static.nix | 20 |
15 files changed, 28 insertions, 20 deletions
diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index 6c136930d3fe..6bdec501630e 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -12,6 +12,8 @@ else stdenv.mkDerivation ({ inherit enableParallelBuilding; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; buildPhase = '' runHook preBuild diff --git a/pkgs/development/ocaml-modules/bolt/default.nix b/pkgs/development/ocaml-modules/bolt/default.nix index 54bc28697ec4..ea32d659f646 100644 --- a/pkgs/development/ocaml-modules/bolt/default.nix +++ b/pkgs/development/ocaml-modules/bolt/default.nix @@ -42,6 +42,8 @@ EOF # The custom `configure` script does not expect the --prefix # option. Installation is handled by ocamlfind. dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/hacl-star/raw.nix b/pkgs/development/ocaml-modules/hacl-star/raw.nix index cd1217b97101..aa787c9a91a0 100644 --- a/pkgs/development/ocaml-modules/hacl-star/raw.nix +++ b/pkgs/development/ocaml-modules/hacl-star/raw.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { installTargets = "install-hacl-star-raw"; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; buildInputs = [ which diff --git a/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix b/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix index fdb0d8034e69..62876e5eaf94 100644 --- a/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix +++ b/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix @@ -17,6 +17,8 @@ buildOcaml (args // { buildInputs = [ ocaml_oasis js_build_tools opaline ] ++ buildInputs; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; configurePhase = "./configure --prefix $out"; diff --git a/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix b/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix index ff03c209190d..2f68ee8230e7 100644 --- a/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix +++ b/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix @@ -16,6 +16,8 @@ buildOcaml rec { buildInputs = [ ocaml_oasis opaline ]; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; configurePhase = "./configure --prefix $prefix"; installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install"; diff --git a/pkgs/development/ocaml-modules/javalib/default.nix b/pkgs/development/ocaml-modules/javalib/default.nix index d158e4216ab4..15678f89da3c 100644 --- a/pkgs/development/ocaml-modules/javalib/default.nix +++ b/pkgs/development/ocaml-modules/javalib/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { configureScript = "./configure.sh"; dontAddPrefix = "true"; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; propagatedBuildInputs = [ camlzip extlib ]; diff --git a/pkgs/development/ocaml-modules/labltk/default.nix b/pkgs/development/ocaml-modules/labltk/default.nix index 5a6daa54de39..3161b56239d0 100644 --- a/pkgs/development/ocaml-modules/labltk/default.nix +++ b/pkgs/development/ocaml-modules/labltk/default.nix @@ -51,6 +51,8 @@ stdenv.mkDerivation rec { configureFlags = [ "--use-findlib" "--installbindir" "$(out)/bin" ]; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; buildFlags = [ "all" "opt" ]; diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix index bdbbf1d8c67f..5c3ca95bb0d8 100644 --- a/pkgs/development/ocaml-modules/ocamlnet/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; preConfigure = '' configureFlagsArray=( diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix index 25d45d9aed9b..96a66874c759 100644 --- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix @@ -40,6 +40,8 @@ buildDunePackage rec { configureFlags = [ "--root $(out)" "--prefix /" ]; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; postConfigure = '' make -C src confs diff --git a/pkgs/development/ocaml-modules/sawja/default.nix b/pkgs/development/ocaml-modules/sawja/default.nix index 68a8731201d6..30ac2cfb22dd 100644 --- a/pkgs/development/ocaml-modules/sawja/default.nix +++ b/pkgs/development/ocaml-modules/sawja/default.nix @@ -31,6 +31,8 @@ stdenv.mkDerivation { configureScript = "./configure.sh"; dontAddPrefix = "true"; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; propagatedBuildInputs = [ javalib ]; diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix index 12523b7bc7d1..95351caee307 100644 --- a/pkgs/development/ocaml-modules/zarith/default.nix +++ b/pkgs/development/ocaml-modules/zarith/default.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation rec { strictDeps = true; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; configureFlags = [ "-installdir ${placeholder "out"}/lib/ocaml/${ocaml.version}/site-lib" ]; preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs"; diff --git a/pkgs/development/tools/ocaml/dune/1.nix b/pkgs/development/tools/ocaml/dune/1.nix index 79707a3c0090..74deb9d2fa55 100644 --- a/pkgs/development/tools/ocaml/dune/1.nix +++ b/pkgs/development/tools/ocaml/dune/1.nix @@ -24,6 +24,8 @@ stdenv.mkDerivation rec { ]; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; meta = with lib; { homepage = "https://dune.build/"; diff --git a/pkgs/development/tools/ocaml/dune/2.nix b/pkgs/development/tools/ocaml/dune/2.nix index 4dadba4e62e3..16f33268cf1e 100644 --- a/pkgs/development/tools/ocaml/dune/2.nix +++ b/pkgs/development/tools/ocaml/dune/2.nix @@ -19,6 +19,8 @@ stdenv.mkDerivation rec { buildFlags = "release"; dontAddPrefix = true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ]; diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix index 4b02231b471f..497a8ce91c1d 100644 --- a/pkgs/development/tools/ocaml/findlib/default.nix +++ b/pkgs/development/tools/ocaml/findlib/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { patches = [ ./ldconf.patch ./install_topfind.patch ]; dontAddPrefix=true; + dontAddStaticConfigureFlags = true; + configurePlatforms = []; configureFlags = [ "-bindir" "${placeholder "out"}/bin" diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 2ca24175cfa0..38f6a8fad424 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -47,21 +47,6 @@ self: super: let # ++ optional (super.stdenv.hostPlatform.libc == "glibc") ((flip overrideInStdenv) [ self.stdenv.glibc.static ]) ; - ocamlFixPackage = b: - b.overrideAttrs (o: { - configurePlatforms = [ ]; - dontAddStaticConfigureFlags = true; - }); - - ocamlStaticAdapter = _: super: - self.lib.mapAttrs - (_: p: if p ? overrideAttrs then ocamlFixPackage p else p) - super - // { - lablgtk = null; # Currently xlibs cause infinite recursion - ocaml = super.ocaml; - }; - in { stdenv = foldl (flip id) super.stdenv staticAdapters; @@ -78,11 +63,6 @@ in { gssSupport = false; }; - ocaml-ng = self.lib.mapAttrs (_: set: - if set ? overrideScope' then set.overrideScope' ocamlStaticAdapter else set - ) super.ocaml-ng; - - zlib = super.zlib.override { # Don’t use new stdenv zlib because # it doesn’t like the --disable-shared flag |