2nd approach at getting a check for /niximpure in stdenv-updates
This commit is contained in:
parent
1af2ada7d4
commit
635880a17a
@ -13,6 +13,10 @@ 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" \
|
||||||
< $out/setup > $out/setup.tmp
|
< $out/setup > $out/setup.tmp
|
||||||
|
if [ -n "$withNixImpure" ]; then
|
||||||
|
sed -i -e 's^@niximpure@^test -f /niximupure/impure.sh && . /niximpure/impure.sh^g' \
|
||||||
|
$out/setup.tmp
|
||||||
|
fi
|
||||||
mv $out/setup.tmp $out/setup
|
mv $out/setup.tmp $out/setup
|
||||||
|
|
||||||
# Allow the user to install stdenv using nix-env and get the packages
|
# Allow the user to install stdenv using nix-env and get the packages
|
||||||
|
@ -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.
|
||||||
|
@ -282,6 +282,8 @@ rec {
|
|||||||
|
|
||||||
fetchurlBoot = fetchurl;
|
fetchurlBoot = fetchurl;
|
||||||
|
|
||||||
|
withNixImpure = if platform ? nixImpure then platform.nixImpure else false;
|
||||||
|
|
||||||
extraAttrs = {
|
extraAttrs = {
|
||||||
inherit (stdenvLinuxBoot3Pkgs) glibc;
|
inherit (stdenvLinuxBoot3Pkgs) glibc;
|
||||||
inherit platform;
|
inherit platform;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user