mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
* Prepend the "prehook" rather than sourcing it.
* Don't call xargs with the -r flag in the Darwin bootstrap. svn path=/nixpkgs/branches/stdenv-updates/; revision=31703
This commit is contained in:
parent
6208059079
commit
ee45e160b1
@ -6,12 +6,13 @@ done
|
||||
|
||||
mkdir $out
|
||||
|
||||
sed \
|
||||
-e "s^@preHook@^$preHook^g" \
|
||||
echo "$preHook" > $out/setup
|
||||
cat "$setup" >> $out/setup
|
||||
|
||||
sed -i "$out/setup" \
|
||||
-e "s^@initialPath@^$initialPath^g" \
|
||||
-e "s^@gcc@^$gcc^g" \
|
||||
-e "s^@shell@^$shell^g" \
|
||||
< "$setup" > "$out/setup"
|
||||
-e "s^@shell@^$shell^g"
|
||||
|
||||
# Allow the user to install stdenv using nix-env and get the packages
|
||||
# in stdenv.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ system, name, preHook ? null, initialPath, gcc, shell
|
||||
{ system, name, preHook ? "", initialPath, gcc, shell
|
||||
, extraAttrs ? {}, overrides ? (pkgs: {})
|
||||
|
||||
, # The `fetchurl' to use for downloading curl and its dependencies
|
||||
|
@ -103,7 +103,6 @@ fi
|
||||
# Execute the pre-hook.
|
||||
export SHELL=@shell@
|
||||
if [ -z "$shell" ]; then export shell=@shell@; fi
|
||||
if [ -n "@preHook@" ]; then source @preHook@; fi
|
||||
runHook preHook
|
||||
|
||||
|
||||
@ -174,6 +173,7 @@ for i in $buildNativeInputs $propagatedBuildNativeInputs; do
|
||||
findInputs $i nativePkgs propagated-build-native-inputs
|
||||
done
|
||||
|
||||
|
||||
# Set the relevant environment variables to point to the build inputs
|
||||
# found above.
|
||||
addToNativeEnv() {
|
||||
|
@ -55,10 +55,10 @@ rec {
|
||||
|
||||
builder = bootstrapFiles.sh;
|
||||
|
||||
args = if (system == "armv5tel-linux") then
|
||||
([ ./scripts/unpack-bootstrap-tools-arm.sh ])
|
||||
else
|
||||
([ ./scripts/unpack-bootstrap-tools.sh ]);
|
||||
args =
|
||||
if system == "armv5tel-linux"
|
||||
then [ ./scripts/unpack-bootstrap-tools-arm.sh ]
|
||||
else [ ./scripts/unpack-bootstrap-tools.sh ];
|
||||
|
||||
inherit (bootstrapFiles) bzip2 mkdir curl cpio;
|
||||
|
||||
@ -82,7 +82,7 @@ rec {
|
||||
import ../generic {
|
||||
inherit system;
|
||||
name = "stdenv-linux-boot";
|
||||
preHook = builtins.toFile "prehook.sh"
|
||||
preHook =
|
||||
''
|
||||
# Don't patch #!/interpreter because it leads to retained
|
||||
# dependencies on the bootstrapTools in the final stdenv.
|
||||
@ -263,7 +263,7 @@ rec {
|
||||
|
||||
inherit system;
|
||||
|
||||
preHook = builtins.toFile "prehook.sh" commonPreHook;
|
||||
preHook = commonPreHook;
|
||||
|
||||
initialPath =
|
||||
((import ../common-path.nix) {pkgs = stdenvLinuxBoot4Pkgs;})
|
||||
|
@ -1,3 +0,0 @@
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
|
||||
havePatchELF=1
|
@ -11,22 +11,23 @@ rec {
|
||||
(if system == "i686-netbsd" then [ "/usr/pkg" ] else []) ++
|
||||
["/" "/usr" "/usr/local"];
|
||||
|
||||
prehookBase = builtins.toFile "prehook-base.sh" ''
|
||||
prehookBase = ''
|
||||
# Disable purity tests; it's allowed (even needed) to link to
|
||||
# libraries outside the Nix store (like the C library).
|
||||
export NIX_ENFORCE_PURITY=
|
||||
'';
|
||||
|
||||
prehookDarwin = builtins.toFile "prehook-darwin.sh" ''
|
||||
source ${prehookBase}
|
||||
prehookDarwin = ''
|
||||
${prehookBase}
|
||||
export NIX_DONT_SET_RPATH=1
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
dontFixLibtool=1
|
||||
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
||||
xargsFlags=" "
|
||||
'';
|
||||
|
||||
prehookFreeBSD = builtins.toFile "prehook-freebsd.sh" ''
|
||||
source ${prehookBase}
|
||||
prehookFreeBSD = ''
|
||||
${prehookBase}
|
||||
|
||||
alias make=gmake
|
||||
alias tar=gtar
|
||||
@ -38,8 +39,8 @@ rec {
|
||||
export NIX_GCC_NEEDS_GREP=1
|
||||
'';
|
||||
|
||||
prehookOpenBSD = builtins.toFile "prehook-openbsd.sh" ''
|
||||
source ${prehookBase}
|
||||
prehookOpenBSD = ''
|
||||
${prehookBase}
|
||||
|
||||
alias make=gmake
|
||||
alias grep=ggrep
|
||||
@ -55,8 +56,8 @@ rec {
|
||||
export NIX_GCC_NEEDS_GREP=1
|
||||
'';
|
||||
|
||||
prehookNetBSD = builtins.toFile "prehook-netbsd.sh" ''
|
||||
source ${prehookBase}
|
||||
prehookNetBSD = ''
|
||||
${prehookBase}
|
||||
|
||||
alias make=gmake
|
||||
alias sed=gsed
|
||||
@ -68,8 +69,8 @@ rec {
|
||||
export NIX_GCC_NEEDS_GREP=1
|
||||
'';
|
||||
|
||||
prehookCygwin = builtins.toFile "prehook-cygwin.sh" ''
|
||||
source ${prehookBase}
|
||||
prehookCygwin = ''
|
||||
${prehookBase}
|
||||
|
||||
if test -z "$cygwinConfigureEnableShared"; then
|
||||
export configureFlags="$configureFlags --disable-shared"
|
||||
|
@ -2,7 +2,21 @@
|
||||
|
||||
import ../generic {
|
||||
name = "stdenv-nix";
|
||||
preHook = ./prehook.sh;
|
||||
|
||||
preHook =
|
||||
''
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
export NIX_IGNORE_LD_THROUGH_GCC=1
|
||||
|
||||
if [ "$system" = "i686-darwin" -o "$system" = "powerpc-darwin" -o "$system" = "x86_64-darwin" ]; then
|
||||
export NIX_DONT_SET_RPATH=1
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
dontFixLibtool=1
|
||||
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
||||
xargsFlags=" "
|
||||
fi
|
||||
'';
|
||||
|
||||
initialPath = (import ../common-path.nix) {pkgs = pkgs;};
|
||||
|
||||
system = stdenv.system;
|
||||
|
@ -1,10 +0,0 @@
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
export NIX_IGNORE_LD_THROUGH_GCC=1
|
||||
|
||||
if test "$system" = "i686-darwin" -o "$system" = "powerpc-darwin" -o "$system" = "x86_64-darwin"; then
|
||||
export NIX_DONT_SET_RPATH=1
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
dontFixLibtool=1
|
||||
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
||||
xargsFlags=" "
|
||||
fi
|
Loading…
Reference in New Issue
Block a user