mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 08:36:41 +01:00
Merge pull request #114902 from obsidiansystems/fix-tools-withPackages
treewide: Fix various tools wrappers "with packages"
This commit is contained in:
commit
d39fafe409
5 changed files with 19 additions and 17 deletions
|
@ -36,8 +36,9 @@ lib.makeOverridable
|
|||
, # Shell commands to run after building the symlink tree.
|
||||
postBuild ? ""
|
||||
|
||||
, # Additional inputs. Handy e.g. if using makeWrapper in `postBuild`.
|
||||
buildInputs ? []
|
||||
# Additional inputs
|
||||
, nativeBuildInputs ? [] # Handy e.g. if using makeWrapper in `postBuild`.
|
||||
, buildInputs ? []
|
||||
|
||||
, passthru ? {}
|
||||
, meta ? {}
|
||||
|
@ -53,7 +54,8 @@ in
|
|||
runCommand name
|
||||
rec {
|
||||
inherit manifest ignoreCollisions checkCollisionContents passthru
|
||||
meta pathsToLink extraPrefix postBuild buildInputs;
|
||||
meta pathsToLink extraPrefix postBuild
|
||||
nativeBuildInputs buildInputs;
|
||||
pkgs = builtins.toJSON (map (drv: {
|
||||
paths =
|
||||
# First add the usual output(s): respect if user has chosen explicitly,
|
||||
|
|
|
@ -57,9 +57,8 @@ symlinkJoin {
|
|||
# as a dedicated drv attribute, like `compiler-name`
|
||||
name = ghc.name + "-with-packages";
|
||||
paths = paths ++ [ghc];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
postBuild = ''
|
||||
. ${makeWrapper}/nix-support/setup-hook
|
||||
|
||||
# wrap compiler executables with correct env variables
|
||||
|
||||
for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do
|
||||
|
|
|
@ -20,17 +20,14 @@ in buildEnv {
|
|||
inherit ignoreCollisions;
|
||||
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
|
||||
# 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
|
||||
# perform the pkg install.
|
||||
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
|
||||
unlink $out/bin
|
||||
mkdir -p "$out/bin"
|
||||
|
|
|
@ -17,11 +17,10 @@ let
|
|||
inherit ignoreCollisions;
|
||||
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
# we create wrapper for the binaries in the different packages
|
||||
postBuild = ''
|
||||
|
||||
. "${makeWrapper}/nix-support/setup-hook"
|
||||
|
||||
if [ -L "$out/bin" ]; then
|
||||
unlink "$out/bin"
|
||||
fi
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
{ lib, stdenv, python, buildEnv, makeWrapper
|
||||
{ lib, stdenv, buildEnv, makeWrapper
|
||||
|
||||
# manually pased
|
||||
, python
|
||||
, requiredPythonModules
|
||||
|
||||
# extra opts
|
||||
, extraLibs ? []
|
||||
, extraOutputsToInstall ? []
|
||||
, postBuild ? ""
|
||||
, ignoreCollisions ? false
|
||||
, permitUserSite ? false
|
||||
, requiredPythonModules
|
||||
# Wrap executables with the given argument.
|
||||
, makeWrapperArgs ? []
|
||||
, }:
|
||||
|
@ -22,9 +27,9 @@ let
|
|||
inherit ignoreCollisions;
|
||||
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
|
||||
|
||||
postBuild = ''
|
||||
. "${makeWrapper}/nix-support/setup-hook"
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
if [ -L "$out/bin" ]; then
|
||||
unlink "$out/bin"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue