* 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 = config =
let { let {
toPath = builtins.toPath; toPath = builtins.toPath;
getEnv = x: if builtins ? getEnv then builtins.getEnv x else "";
pathExists = name: pathExists = name:
builtins ? pathExists && builtins.pathExists (toPath name); builtins ? pathExists && builtins.pathExists (toPath name);
configFile = builtins.getEnv "NIXPKGS_CONFIG"; configFile = getEnv "NIXPKGS_CONFIG";
homeDir = builtins.getEnv "HOME"; homeDir = getEnv "HOME";
configFile2 = homeDir + "/.nixpkgs/config.nix"; configFile2 = homeDir + "/.nixpkgs/config.nix";
body = body =