* Allow the user to install stdenv (nix-env -i stdenv) and get all the

packages in the stdenv as propagated user environment packages.

svn path=/nixpkgs/branches/stdenv-updates/; revision=15300
This commit is contained in:
Eelco Dolstra 2009-04-25 14:08:29 +00:00
parent 5175cce9a9
commit 671d53dd35
4 changed files with 20 additions and 9 deletions

View File

@ -123,5 +123,9 @@ rec {
else f (path ++ [name]) value;
in mapAttrs g set;
in recurse [] set;
/* Check whether the argument is a derivation. */
isDerivation = x: isAttrs x && x ? type && x.type == "derivation";
}

View File

@ -30,3 +30,8 @@ sed \
-e "s^@param4@^$p4^g" \
-e "s^@param5@^$p5^g" \
< "$setup" > "$out/setup"
# Allow the user to install stdenv using nix-env and get the packages
# in stdenv.
mkdir $out/nix-support
echo $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages

View File

@ -7,7 +7,9 @@
fetchurlBoot
}:
let {
let
lib = import ../../lib;
stdenvGenerator = setupScript: rec {
@ -27,6 +29,9 @@ let {
# TODO: make this more elegant.
inherit param1 param2 param3 param4 param5;
propagatedUserEnvPkgs = [gcc] ++
lib.filter lib.isDerivation initialPath;
}
// {
@ -79,7 +84,7 @@ let {
# For convenience, bring in the library functions in lib/ so
# packages don't have to do that themselves.
lib = import ../../lib;
inherit lib;
inherit fetchurlBoot;
@ -94,6 +99,4 @@ let {
}.result;
body = stdenvGenerator ./setup.sh;
}
in stdenvGenerator ./setup.sh

View File

@ -205,10 +205,9 @@ rec {
preHook = builtins.toFile "prehook.sh" commonPreHook;
initialPath = [
initialPath =
((import ../common-path.nix) {pkgs = stdenvLinuxBoot3Pkgs;})
stdenvLinuxBoot3Pkgs.patchelf
];
++ [stdenvLinuxBoot3Pkgs.patchelf];
gcc = wrapGCC rec {
inherit (stdenvLinuxBoot2Pkgs) binutils;