From d297dc6e23dcf771e0da6349ef6df656daca387a Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Thu, 14 Jul 2022 20:19:19 +0200 Subject: [PATCH 01/11] appvm: makeWrapper to nativeBuildInputs --- pkgs/applications/virtualization/appvm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/appvm/default.nix b/pkgs/applications/virtualization/appvm/default.nix index 27002bac405f..fdbfb27dfb86 100644 --- a/pkgs/applications/virtualization/appvm/default.nix +++ b/pkgs/applications/virtualization/appvm/default.nix @@ -32,7 +32,7 @@ buildGoModule rec { vendorSha256 = "sha256-8eU+Mf5dxL/bAMMShXvj8I1Kdd4ysBTWvgYIXwLStPI="; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; postFixup = '' wrapProgram $out/bin/appvm \ From b315bd7e0d39edb99cbacfa8fd2b8233fff68ceb Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Thu, 14 Jul 2022 20:19:49 +0200 Subject: [PATCH 02/11] acl2: makeWrapper to nativeBuildInputs --- pkgs/development/interpreters/acl2/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/acl2/default.nix b/pkgs/development/interpreters/acl2/default.nix index 170e2a183298..1ca3742e737b 100644 --- a/pkgs/development/interpreters/acl2/default.nix +++ b/pkgs/development/interpreters/acl2/default.nix @@ -10,7 +10,7 @@ let # ACL2 system itself; see # https://www.cs.utexas.edu/users/moore/acl2/current/HTML/installation/requirements.html#Obtaining-SBCL sbcl' = args.sbcl.override { disableImmobileSpace = true; }; - sbcl = runCommandLocal args.sbcl.name { buildInputs = [ makeWrapper ]; } '' + sbcl = runCommandLocal args.sbcl.name { nativeBuildInputs = [ makeWrapper ]; } '' makeWrapper ${sbcl'}/bin/sbcl $out/bin/sbcl \ --add-flags "--dynamic-space-size 2000" ''; @@ -40,12 +40,14 @@ in stdenv.mkDerivation rec { libcrypto = "${lib.getLib openssl}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}"; })]; + nativeBuildInputs = lib.optional certifyBooks makeWrapper; + buildInputs = [ # ACL2 itself only needs a Common Lisp compiler/interpreter: sbcl ] ++ lib.optionals certifyBooks [ # To build community books, we need Perl and a couple of utilities: - which perl hostname makeWrapper + which perl hostname # Some of the books require one or more of these external tools: glucose minisat abc-verifier libipasir z3 (python2.withPackages (ps: [ ps.z3 ])) From e80df4e24b39844cce963ba9e4a443e8a1eba1a2 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Thu, 14 Jul 2022 20:20:09 +0200 Subject: [PATCH 03/11] apache-jena: makeWrapper to nativeBuildInputs --- pkgs/servers/nosql/apache-jena/binary.nix | 2 +- pkgs/servers/nosql/apache-jena/fuseki-binary.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/nosql/apache-jena/binary.nix b/pkgs/servers/nosql/apache-jena/binary.nix index 0c7e2e76b963..20573a58a735 100644 --- a/pkgs/servers/nosql/apache-jena/binary.nix +++ b/pkgs/servers/nosql/apache-jena/binary.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { url = "https://dlcdn.apache.org/jena/binaries/apache-jena-${version}.tar.gz"; sha256 = "sha256-/KHjhMNnqac2HG/yvHJa0MwdReX6XuexojaMgRFdaWo="; }; - buildInputs = [ + nativeBuildInputs = [ makeWrapper ]; installPhase = '' diff --git a/pkgs/servers/nosql/apache-jena/fuseki-binary.nix b/pkgs/servers/nosql/apache-jena/fuseki-binary.nix index d7c53bc7aa83..caec7449b644 100644 --- a/pkgs/servers/nosql/apache-jena/fuseki-binary.nix +++ b/pkgs/servers/nosql/apache-jena/fuseki-binary.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { url = "https://dlcdn.apache.org/jena/binaries/apache-jena-fuseki-${version}.tar.gz"; sha256 = "1r0vfa7d55lzw22yfx46mxxmz8x8pkr666vggqw2m1rzzj52z9nx"; }; - buildInputs = [ + nativeBuildInputs = [ makeWrapper ]; installPhase = '' From f993f699c7fdb525c1a6c7e8f8bed2f5c7f1170c Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Thu, 14 Jul 2022 20:50:59 +0200 Subject: [PATCH 04/11] azure-functions-core-tools: some deps to nativeBuildInputs --- .../development/tools/azure-functions-core-tools/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/tools/azure-functions-core-tools/default.nix b/pkgs/development/tools/azure-functions-core-tools/default.nix index 27aa1e2f3714..6693d83e1f14 100644 --- a/pkgs/development/tools/azure-functions-core-tools/default.nix +++ b/pkgs/development/tools/azure-functions-core-tools/default.nix @@ -23,13 +23,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-NdTEFQaG8eFengjzQr51ezehIHFvQZqmrjpjWk4vZKo="; }; - buildInputs = [ + nativeBuildInputs = [ unzip makeWrapper dotnetbuildhelpers - ]; - - nativeBuildInputs = [ icu libunwind curl From a22312d5cd396cc77197310c21bc7569c3b676dd Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Thu, 14 Jul 2022 20:51:37 +0200 Subject: [PATCH 05/11] arion: use build makeWrapper instead of host one --- pkgs/applications/virtualization/arion/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/arion/default.nix b/pkgs/applications/virtualization/arion/default.nix index 71de7d90ca7e..716a94a05d8e 100644 --- a/pkgs/applications/virtualization/arion/default.nix +++ b/pkgs/applications/virtualization/arion/default.nix @@ -3,6 +3,7 @@ , haskellPackages , haskell , runCommand +, buildPackages }: let @@ -32,7 +33,7 @@ let inherit (haskellPackages) arion-compose; cabalOverrides = o: { - buildTools = (o.buildTools or []) ++ [pkgs.makeWrapper]; + buildTools = (o.buildTools or []) ++ [buildPackages.makeWrapper]; passthru = (o.passthru or {}) // { inherit eval build; }; From ef74fd873ab7cfa54d73c7f8e30b4d605cec5bab Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Thu, 14 Jul 2022 23:26:35 +0200 Subject: [PATCH 06/11] chickenPackages_4.chicken, chickenPackages_5.chicken: move makeWrapper to nativeBuildInputs --- pkgs/development/compilers/chicken/4/chicken.nix | 8 +++++--- pkgs/development/compilers/chicken/5/chicken.nix | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/chicken/4/chicken.nix b/pkgs/development/compilers/chicken/4/chicken.nix index 8ea522a81a92..1779d9c3ce54 100644 --- a/pkgs/development/compilers/chicken/4/chicken.nix +++ b/pkgs/development/compilers/chicken/4/chicken.nix @@ -39,11 +39,13 @@ stdenv.mkDerivation { ./0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch ]; - buildInputs = [ + nativeBuildInputs = [ makeWrapper - ] ++ (lib.optionals (bootstrap-chicken != null) [ + ]; + + buildInputs = lib.optionals (bootstrap-chicken != null) [ bootstrap-chicken - ]); + ]; preBuild = lib.optionalString (bootstrap-chicken != null) '' # Backup the build* files - those are generated from hostname, diff --git a/pkgs/development/compilers/chicken/5/chicken.nix b/pkgs/development/compilers/chicken/5/chicken.nix index 32d8435e378d..0df2476c4ba2 100644 --- a/pkgs/development/compilers/chicken/5/chicken.nix +++ b/pkgs/development/compilers/chicken/5/chicken.nix @@ -31,11 +31,13 @@ stdenv.mkDerivation rec { "C_COMPILER=$(CC)" ]); - buildInputs = [ + nativeBuildInputs = [ makeWrapper - ] ++ (lib.optionals (bootstrap-chicken != null) [ + ]; + + buildInputs = lib.optionals (bootstrap-chicken != null) [ bootstrap-chicken - ]); + ]; postInstall = '' for f in $out/bin/* From 89b3f25cbdedb42de7d43b930db6b7fed2c00d89 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Fri, 15 Jul 2022 19:21:54 +0200 Subject: [PATCH 07/11] cling: use makeWrapper for build platform --- pkgs/development/interpreters/cling/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/cling/default.nix b/pkgs/development/interpreters/cling/default.nix index 968817cf067a..1ec265f305b6 100644 --- a/pkgs/development/interpreters/cling/default.nix +++ b/pkgs/development/interpreters/cling/default.nix @@ -94,7 +94,7 @@ let in runCommand "cling-${unwrapped.version}" { - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; inherit unwrapped flags compilerIncludeFlags; inherit (unwrapped) meta; } '' From fc045d663da3adffbbefd001b75534598cff5e75 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Fri, 15 Jul 2022 19:23:36 +0200 Subject: [PATCH 08/11] asls: move erlangR22 to nativeBuildInputs --- pkgs/development/tools/misc/asls/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/asls/default.nix b/pkgs/development/tools/misc/asls/default.nix index bccda0185036..9987c9b5426e 100644 --- a/pkgs/development/tools/misc/asls/default.nix +++ b/pkgs/development/tools/misc/asls/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "05kp44p4q4sdykfw0b4k9j3qdp0qvwgjbs48ncmnd0ass0xrmi3s"; }; - buildInputs = [ erlangR22 ]; + nativeBuildInputs = [ erlangR22 ]; installPhase = "install -Dm755 -t $out/bin asls"; meta = with lib; { From 44b4be94cfd0215fd4c1a6a2a6929dddf07e23d4 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Fri, 15 Jul 2022 19:24:21 +0200 Subject: [PATCH 09/11] varnish: move makeWrapper to nativeBuildInputs --- pkgs/servers/varnish/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/varnish/default.nix b/pkgs/servers/varnish/default.nix index 37705cc689de..6f34c2ebab83 100644 --- a/pkgs/servers/varnish/default.nix +++ b/pkgs/servers/varnish/default.nix @@ -14,9 +14,9 @@ let passthru.python = python3; - nativeBuildInputs = with python3.pkgs; [ pkg-config docutils sphinx ]; + nativeBuildInputs = with python3.pkgs; [ pkg-config docutils sphinx makeWrapper]; buildInputs = [ - libxslt groff ncurses readline libedit makeWrapper python3 + libxslt groff ncurses readline libedit python3 ] ++ lib.optional (lib.versionOlder version "7") pcre ++ lib.optional (lib.versionAtLeast version "7") pcre2 From 058764026b0785414967ab4563379b1472f208a6 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Fri, 15 Jul 2022 19:37:49 +0200 Subject: [PATCH 10/11] conda: use makeWrapper for build platform --- pkgs/tools/package-management/conda/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/package-management/conda/default.nix b/pkgs/tools/package-management/conda/default.nix index 744b0978c9b6..ff655ac6e9b3 100644 --- a/pkgs/tools/package-management/conda/default.nix +++ b/pkgs/tools/package-management/conda/default.nix @@ -42,7 +42,7 @@ let zlib # libz.so.1 ]; in - runCommand "conda-install" { buildInputs = [ makeWrapper zlib]; } + runCommand "conda-install" { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ zlib]; } # on line 10, we have 'unset LD_LIBRARY_PATH' # we have to comment it out however in a way that the number of bytes in the # file does not change. So we replace the 'u' in the line with a '#' From 77449a077a2d65f6ff16fed28f2caca8fc4761b9 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Fri, 15 Jul 2022 19:42:04 +0200 Subject: [PATCH 11/11] couchdb: fix eval for cross-compilation Use erlangR22 for the build platform. Requires buildPackages in top-level due to no splicing at that level. --- pkgs/servers/http/couchdb/3.nix | 7 +++++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/http/couchdb/3.nix b/pkgs/servers/http/couchdb/3.nix index 7f02d5fb858c..cea02e1b01bf 100644 --- a/pkgs/servers/http/couchdb/3.nix +++ b/pkgs/servers/http/couchdb/3.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_91 -, coreutils, bash, makeWrapper, python3, nixosTests }: +, coreutils, bash, python3, nixosTests }: stdenv.mkDerivation rec { pname = "couchdb"; @@ -13,7 +13,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-acn9b4ATNVf2igLpLdpypP1kbWRvQp9Fu4Mpow+C8g4="; }; - buildInputs = [ erlang icu openssl spidermonkey_91 (python3.withPackages(ps: with ps; [ requests ]))]; + nativeBuildInputs = [ + erlang + ]; + buildInputs = [ icu openssl spidermonkey_91 (python3.withPackages(ps: with ps; [ requests ]))]; postPatch = '' substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91" patchShebangs bin/rebar diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d02ad441b1c8..8bb23c141b9e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22332,7 +22332,7 @@ with pkgs; codeowners = callPackage ../development/tools/codeowners { }; couchdb3 = callPackage ../servers/http/couchdb/3.nix { - erlang = erlangR22; + erlang = buildPackages.erlangR22; }; dcnnt = python3Packages.callPackage ../servers/dcnnt { };