mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 09:03:42 +00:00
* Check for the existence of getEnv.
svn path=/nixpkgs/trunk/; revision=6600
This commit is contained in:
parent
ed58e70864
commit
dbda65a6f3
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user