Merge branch 'stdenv-updates' into pi-stdenv-updates
This commit is contained in:
commit
c41881842b
|
@ -9,9 +9,15 @@ mkdir $out
|
||||||
echo "$preHook" > $out/setup
|
echo "$preHook" > $out/setup
|
||||||
cat "$setup" >> $out/setup
|
cat "$setup" >> $out/setup
|
||||||
|
|
||||||
|
if [ "$withNixImpure" == 1 ]; then
|
||||||
|
# sed wants \&\& for a &&
|
||||||
|
niximpure='test -f /niximpure/impure.sh \&\& . /niximpure/impure.sh'
|
||||||
|
fi
|
||||||
|
|
||||||
sed -e "s^@initialPath@^$initialPath^g" \
|
sed -e "s^@initialPath@^$initialPath^g" \
|
||||||
-e "s^@gcc@^$gcc^g" \
|
-e "s^@gcc@^$gcc^g" \
|
||||||
-e "s^@shell@^$shell^g" \
|
-e "s^@shell@^$shell^g" \
|
||||||
|
-e "s^@niximpure@^$niximpure^g" \
|
||||||
< $out/setup > $out/setup.tmp
|
< $out/setup > $out/setup.tmp
|
||||||
mv $out/setup.tmp $out/setup
|
mv $out/setup.tmp $out/setup
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ system, name ? "stdenv", preHook ? "", initialPath, gcc, shell
|
{ system, name ? "stdenv", preHook ? "", initialPath, gcc, shell
|
||||||
, extraAttrs ? {}, overrides ? (pkgs: {})
|
, extraAttrs ? {}, overrides ? (pkgs: {})
|
||||||
|
, withNixImpure ? false
|
||||||
|
|
||||||
, # The `fetchurl' to use for downloading curl and its dependencies
|
, # The `fetchurl' to use for downloading curl and its dependencies
|
||||||
# (see all-packages.nix).
|
# (see all-packages.nix).
|
||||||
|
@ -26,7 +27,7 @@ let
|
||||||
|
|
||||||
setup = setupScript;
|
setup = setupScript;
|
||||||
|
|
||||||
inherit preHook initialPath gcc shell;
|
inherit preHook initialPath gcc shell withNixImpure;
|
||||||
|
|
||||||
propagatedUserEnvPkgs = [gcc] ++
|
propagatedUserEnvPkgs = [gcc] ++
|
||||||
lib.filter lib.isDerivation initialPath;
|
lib.filter lib.isDerivation initialPath;
|
||||||
|
|
|
@ -270,6 +270,7 @@ elif [ "$NIX_BUILD_CORES" -le 0 ]; then
|
||||||
fi
|
fi
|
||||||
export NIX_BUILD_CORES
|
export NIX_BUILD_CORES
|
||||||
|
|
||||||
|
@niximpure@
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Misc. helper functions.
|
# Misc. helper functions.
|
||||||
|
|
|
@ -95,6 +95,7 @@ rec {
|
||||||
initialPath = [bootstrapTools] ++ extraPath;
|
initialPath = [bootstrapTools] ++ extraPath;
|
||||||
fetchurlBoot = fetchurl;
|
fetchurlBoot = fetchurl;
|
||||||
inherit gcc;
|
inherit gcc;
|
||||||
|
withNixImpure = if platform ? nixImpure then platform.nixImpure else false;
|
||||||
# Having the proper 'platform' in all the stdenvs allows getting proper
|
# Having the proper 'platform' in all the stdenvs allows getting proper
|
||||||
# linuxHeaders for example.
|
# linuxHeaders for example.
|
||||||
extraAttrs = extraAttrs // { inherit platform; };
|
extraAttrs = extraAttrs // { inherit platform; };
|
||||||
|
@ -270,7 +271,7 @@ rec {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
preHook = commonPreHook;
|
preHook = commonPreHook;
|
||||||
|
|
||||||
initialPath =
|
initialPath =
|
||||||
((import ../common-path.nix) {pkgs = stdenvLinuxBoot4Pkgs;})
|
((import ../common-path.nix) {pkgs = stdenvLinuxBoot4Pkgs;})
|
||||||
++ [stdenvLinuxBoot4Pkgs.patchelf];
|
++ [stdenvLinuxBoot4Pkgs.patchelf];
|
||||||
|
@ -287,6 +288,8 @@ rec {
|
||||||
shell = stdenvLinuxBoot4Pkgs.bash + "/bin/bash";
|
shell = stdenvLinuxBoot4Pkgs.bash + "/bin/bash";
|
||||||
|
|
||||||
fetchurlBoot = fetchurl;
|
fetchurlBoot = fetchurl;
|
||||||
|
|
||||||
|
withNixImpure = if platform ? nixImpure then platform.nixImpure else false;
|
||||||
|
|
||||||
extraAttrs = {
|
extraAttrs = {
|
||||||
inherit (stdenvLinuxBoot3Pkgs) glibc;
|
inherit (stdenvLinuxBoot3Pkgs) glibc;
|
||||||
|
|
Loading…
Reference in New Issue