* Check for the existence of getEnv.

svn path=/nixpkgs/trunk/; revision=6600
This commit is contained in:
Eelco Dolstra 2006-09-24 21:49:07 +00:00
parent ed58e70864
commit dbda65a6f3

View File

@ -99,11 +99,12 @@ rec {
config =
let {
toPath = builtins.toPath;
getEnv = x: if builtins ? getEnv then builtins.getEnv x else "";
pathExists = name:
builtins ? pathExists && builtins.pathExists (toPath name);
configFile = builtins.getEnv "NIXPKGS_CONFIG";
homeDir = builtins.getEnv "HOME";
configFile = getEnv "NIXPKGS_CONFIG";
homeDir = getEnv "HOME";
configFile2 = homeDir + "/.nixpkgs/config.nix";
body =