forked from mirrors/nixpkgs
Fixing problems in the previous commit. It didn't work.
This commit is contained in:
parent
635880a17a
commit
b190e6cd93
|
@ -9,14 +9,16 @@ 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
|
||||||
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
|
||||||
|
|
|
@ -94,6 +94,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; };
|
||||||
|
|
Loading…
Reference in a new issue