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
This commit is contained in:
parent
4f6ec19dbc
commit
07ecf87693
@ -57,9 +57,8 @@ symlinkJoin {
|
|||||||
# as a dedicated drv attribute, like `compiler-name`
|
# as a dedicated drv attribute, like `compiler-name`
|
||||||
name = ghc.name + "-with-packages";
|
name = ghc.name + "-with-packages";
|
||||||
paths = paths ++ [ghc];
|
paths = paths ++ [ghc];
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
. ${makeWrapper}/nix-support/setup-hook
|
|
||||||
|
|
||||||
# wrap compiler executables with correct env variables
|
# wrap compiler executables with correct env variables
|
||||||
|
|
||||||
for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do
|
for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do
|
||||||
|
@ -20,17 +20,14 @@ in buildEnv {
|
|||||||
inherit ignoreCollisions;
|
inherit ignoreCollisions;
|
||||||
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
||||||
|
|
||||||
buildInputs = [ makeWrapper texinfo wrapOctave ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
buildInputs = [ texinfo wrapOctave ];
|
||||||
|
|
||||||
# During "build" we must first unlink the /share symlink to octave's /share
|
# During "build" we must first unlink the /share symlink to octave's /share
|
||||||
# Then, we can re-symlink the all of octave/share, except for /share/octave
|
# Then, we can re-symlink the all of octave/share, except for /share/octave
|
||||||
# in env/share/octave, re-symlink everything from octave/share/octave and then
|
# in env/share/octave, re-symlink everything from octave/share/octave and then
|
||||||
# perform the pkg install.
|
# perform the pkg install.
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
. "${makeWrapper}/nix-support/setup-hook"
|
|
||||||
# The `makeWrapper` used here is the one defined in
|
|
||||||
# ${makeWrapper}/nix-support/setup-hook
|
|
||||||
|
|
||||||
if [ -L "$out/bin" ]; then
|
if [ -L "$out/bin" ]; then
|
||||||
unlink $out/bin
|
unlink $out/bin
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
|
@ -17,11 +17,10 @@ let
|
|||||||
inherit ignoreCollisions;
|
inherit ignoreCollisions;
|
||||||
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
# we create wrapper for the binaries in the different packages
|
# we create wrapper for the binaries in the different packages
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
|
|
||||||
. "${makeWrapper}/nix-support/setup-hook"
|
|
||||||
|
|
||||||
if [ -L "$out/bin" ]; then
|
if [ -L "$out/bin" ]; then
|
||||||
unlink "$out/bin"
|
unlink "$out/bin"
|
||||||
fi
|
fi
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
{ lib, stdenv, python, buildEnv, makeWrapper
|
{ lib, stdenv, buildEnv, makeWrapper
|
||||||
|
|
||||||
|
# manually pased
|
||||||
|
, python
|
||||||
|
, requiredPythonModules
|
||||||
|
|
||||||
|
# extra opts
|
||||||
, extraLibs ? []
|
, extraLibs ? []
|
||||||
, extraOutputsToInstall ? []
|
, extraOutputsToInstall ? []
|
||||||
, postBuild ? ""
|
, postBuild ? ""
|
||||||
, ignoreCollisions ? false
|
, ignoreCollisions ? false
|
||||||
, permitUserSite ? false
|
, permitUserSite ? false
|
||||||
, requiredPythonModules
|
|
||||||
# Wrap executables with the given argument.
|
# Wrap executables with the given argument.
|
||||||
, makeWrapperArgs ? []
|
, makeWrapperArgs ? []
|
||||||
, }:
|
, }:
|
||||||
@ -22,9 +27,9 @@ let
|
|||||||
inherit ignoreCollisions;
|
inherit ignoreCollisions;
|
||||||
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
||||||
|
|
||||||
postBuild = ''
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
. "${makeWrapper}/nix-support/setup-hook"
|
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
if [ -L "$out/bin" ]; then
|
if [ -L "$out/bin" ]; then
|
||||||
unlink "$out/bin"
|
unlink "$out/bin"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user