treewide: Fix various tools wrappers "with packages"

Now that `buildEnv` is ready, always put `makeWrapper` in
`nativeBuildInputs`, rather than `buildInputs` or (worse) mucking around
with setup hooks by hand.

(C.f. #112276, which didn't catch these because the manual setup hook
sourcing is such a hack to being with!)

Fixes #114687

+14 -14
+1 -2
pkgs/development/haskell-modules/with-packages-wrapper.nix
··· 57 # as a dedicated drv attribute, like `compiler-name` 58 name = ghc.name + "-with-packages"; 59 paths = paths ++ [ghc]; 60 postBuild = '' 61 - . ${makeWrapper}/nix-support/setup-hook 62 - 63 # wrap compiler executables with correct env variables 64 65 for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do
··· 57 # as a dedicated drv attribute, like `compiler-name` 58 name = ghc.name + "-with-packages"; 59 paths = paths ++ [ghc]; 60 + nativeBuildInputs = [ makeWrapper ]; 61 postBuild = '' 62 # wrap compiler executables with correct env variables 63 64 for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do
+2 -5
pkgs/development/interpreters/octave/build-env.nix
··· 20 inherit ignoreCollisions; 21 extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall; 22 23 - buildInputs = [ makeWrapper texinfo wrapOctave ]; 24 25 # During "build" we must first unlink the /share symlink to octave's /share 26 # Then, we can re-symlink the all of octave/share, except for /share/octave 27 # in env/share/octave, re-symlink everything from octave/share/octave and then 28 # perform the pkg install. 29 postBuild = '' 30 - . "${makeWrapper}/nix-support/setup-hook" 31 - # The `makeWrapper` used here is the one defined in 32 - # ${makeWrapper}/nix-support/setup-hook 33 - 34 if [ -L "$out/bin" ]; then 35 unlink $out/bin 36 mkdir -p "$out/bin"
··· 20 inherit ignoreCollisions; 21 extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall; 22 23 + nativeBuildInputs = [ makeWrapper ]; 24 + buildInputs = [ texinfo wrapOctave ]; 25 26 # During "build" we must first unlink the /share symlink to octave's /share 27 # Then, we can re-symlink the all of octave/share, except for /share/octave 28 # in env/share/octave, re-symlink everything from octave/share/octave and then 29 # perform the pkg install. 30 postBuild = '' 31 if [ -L "$out/bin" ]; then 32 unlink $out/bin 33 mkdir -p "$out/bin"
+2 -3
pkgs/development/interpreters/perl/wrapper.nix
··· 17 inherit ignoreCollisions; 18 extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall; 19 20 # we create wrapper for the binaries in the different packages 21 postBuild = '' 22 - 23 - . "${makeWrapper}/nix-support/setup-hook" 24 - 25 if [ -L "$out/bin" ]; then 26 unlink "$out/bin" 27 fi
··· 17 inherit ignoreCollisions; 18 extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall; 19 20 + nativeBuildInputs = [ makeWrapper ]; 21 + 22 # we create wrapper for the binaries in the different packages 23 postBuild = '' 24 if [ -L "$out/bin" ]; then 25 unlink "$out/bin" 26 fi
+9 -4
pkgs/development/interpreters/python/wrapper.nix
··· 1 - { lib, stdenv, python, buildEnv, makeWrapper 2 , extraLibs ? [] 3 , extraOutputsToInstall ? [] 4 , postBuild ? "" 5 , ignoreCollisions ? false 6 , permitUserSite ? false 7 - , requiredPythonModules 8 # Wrap executables with the given argument. 9 , makeWrapperArgs ? [] 10 , }: ··· 22 inherit ignoreCollisions; 23 extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall; 24 25 - postBuild = '' 26 - . "${makeWrapper}/nix-support/setup-hook" 27 28 if [ -L "$out/bin" ]; then 29 unlink "$out/bin" 30 fi
··· 1 + { lib, stdenv, buildEnv, makeWrapper 2 + 3 + # manually pased 4 + , python 5 + , requiredPythonModules 6 + 7 + # extra opts 8 , extraLibs ? [] 9 , extraOutputsToInstall ? [] 10 , postBuild ? "" 11 , ignoreCollisions ? false 12 , permitUserSite ? false 13 # Wrap executables with the given argument. 14 , makeWrapperArgs ? [] 15 , }: ··· 27 inherit ignoreCollisions; 28 extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall; 29 30 + nativeBuildInputs = [ makeWrapper ]; 31 32 + postBuild = '' 33 if [ -L "$out/bin" ]; then 34 unlink "$out/bin" 35 fi