From 9594f53b996966eb87e2040561a589ff5419debc Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 14 Aug 2023 23:12:28 +0300 Subject: [PATCH 1/3] sage.with-env: remove unnecessary makeWrapper Builds without it, all it seems to be doing is adding `/nix/store/6xfmwacsa9a7mzjjarknf9zg28q67ghq-sage-with-env-10.0/var/lib/sage/installed/make_shell_wrapper-hook` --- pkgs/applications/science/math/sage/sage-with-env.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix index 7632b851773c..378f7e29dd99 100644 --- a/pkgs/applications/science/math/sage/sage-with-env.nix +++ b/pkgs/applications/science/math/sage/sage-with-env.nix @@ -1,6 +1,5 @@ { stdenv , lib -, makeWrapper , sage-env , blas , lapack @@ -72,7 +71,7 @@ let [] ); - allInputs = lib.remove null (nativeBuildInputs ++ buildInputs ++ pythonEnv.extraLibs ++ [ makeWrapper ]); + allInputs = lib.remove null (nativeBuildInputs ++ buildInputs ++ pythonEnv.extraLibs); transitiveDeps = lib.unique (builtins.concatLists (map transitiveClosure allInputs )); # fix differences between spkg and sage names # (could patch sage instead, but this is more lightweight and also works for packages depending on sage) From 88b60b61b9b35d481d29157e93f07ee963b9c43c Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 15 Aug 2023 01:01:54 +0300 Subject: [PATCH 2/3] treewide: fix cross makeWrapper eval fix `error: makeWrapper/makeShellWrapper must be in nativeBuildInputs` The `faust.faust2ApplBase` in used in `faust2sc` + more, requires changes because it puts all the callPackage arguments in the `mkDerivation` call and thus causes a eval fail `nix-eval-jobs --flake ".#legacyPackages.x86_64-linux.pkgsCross.aarch64-multiplatform" --workers 2 2>/dev/null --impure | jq 'select(.error?) | select(.error | match ("makeWrapper/makeShellWrapper"))' --- pkgs/applications/audio/faust/faust2alqt.nix | 4 ++-- pkgs/applications/audio/faust/faust2jaqt.nix | 4 ++-- pkgs/top-level/all-packages.nix | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/audio/faust/faust2alqt.nix b/pkgs/applications/audio/faust/faust2alqt.nix index 1d86cc3f6c3f..b12b41763ba5 100644 --- a/pkgs/applications/audio/faust/faust2alqt.nix +++ b/pkgs/applications/audio/faust/faust2alqt.nix @@ -2,12 +2,12 @@ , alsa-lib , qtbase , writeText -, makeWrapper +, buildPackages }: let # Wrap the binary coming out of the the compilation script, so it knows QT_PLUGIN_PATH wrapBinary = writeText "wrapBinary" '' - source ${makeWrapper}/nix-support/setup-hook + source ${buildPackages.makeWrapper}/nix-support/setup-hook for p in $FILES; do workpath=$PWD cd -- "$(dirname "$p")" diff --git a/pkgs/applications/audio/faust/faust2jaqt.nix b/pkgs/applications/audio/faust/faust2jaqt.nix index 90498c9e3e3a..90b6ca218dd4 100644 --- a/pkgs/applications/audio/faust/faust2jaqt.nix +++ b/pkgs/applications/audio/faust/faust2jaqt.nix @@ -4,13 +4,13 @@ , libsndfile , alsa-lib , writeText -, makeWrapper +, buildPackages , which }: let # Wrap the binary coming out of the the compilation script, so it knows QT_PLUGIN_PATH wrapBinary = writeText "wrapBinary" '' - source ${makeWrapper}/nix-support/setup-hook + source ${buildPackages.makeWrapper}/nix-support/setup-hook for p in $FILES; do workpath=$PWD cd -- "$(dirname "$p")" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0ce71f677689..8e97f620ebf1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13713,7 +13713,9 @@ with pkgs; tmux-xpanes = callPackage ../tools/misc/tmux-xpanes { }; - tmuxPlugins = recurseIntoAttrs (callPackage ../misc/tmux-plugins { }); + tmuxPlugins = recurseIntoAttrs (callPackage ../misc/tmux-plugins { + pkgs = pkgs.__splicedPackages; + }); tmsu = callPackage ../tools/filesystems/tmsu { }; @@ -16167,6 +16169,7 @@ with pkgs; idrisPackages = dontRecurseIntoAttrs (callPackage ../development/idris-modules { idris-no-deps = haskellPackages.idris; + pkgs = pkgs.__splicedPackages; }); idris = idrisPackages.with-packages [ idrisPackages.base ] ; From aae9f2ca22efe20369bfbd74561bbdaa61e5d381 Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 15 Aug 2023 01:32:58 +0300 Subject: [PATCH 3/3] sbt-with-scala-native: use `overrideAttrs` to fix `nativeBuildInputs` splicing preserve old nativeBuildInputs which includes autoPatchelfHook which was not there when this override was added drop the `sha256` and `version` overrides which have never worked properly because they haven't been overriding src. `sha256` and `version` were added in 49c7bed76385ab46d5e0f76b2f26f17a2c7d3658 --- .../tools/build-managers/sbt/scala-native.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/build-managers/sbt/scala-native.nix b/pkgs/development/tools/build-managers/sbt/scala-native.nix index 70038ed2d3a4..caa9feebb519 100644 --- a/pkgs/development/tools/build-managers/sbt/scala-native.nix +++ b/pkgs/development/tools/build-managers/sbt/scala-native.nix @@ -1,13 +1,9 @@ { lib, sbt, makeWrapper, boehmgc, libunwind, re2, llvmPackages, zlib }: -sbt.overrideDerivation(old: { - nativeBuildInputs = [ makeWrapper ]; +sbt.overrideAttrs(previousAttrs: { + nativeBuildInputs = (previousAttrs.nativeBuildInputs or [ ]) ++ [ makeWrapper ]; - version = "0.13.16"; - - sha256 = "033nvklclvbirhpsiy28d3ccmbm26zcs9vb7j8jndsc1ln09awi2"; - - postFixup = '' + postFixup = (previousAttrs.postFixup or "") + '' wrapProgram $out/bin/sbt \ --set CLANG_PATH "${llvmPackages.clang}/bin/clang" \ --set CLANGPP_PATH "${llvmPackages.clang}/bin/clang" \