Merge pull request #16384 from Ericson2314/top-level-to-path

top-level: builtins.toPath no longer needed
This commit is contained in:
zimbatm 2016-06-21 14:21:01 +01:00 committed by GitHub
commit afbba2bffa

View File

@ -44,10 +44,7 @@ let
# for NIXOS (nixos-rebuild): use nixpkgs.config option
config =
let
toPath = builtins.toPath;
getEnv = builtins.getEnv;
pathExists = name:
builtins.pathExists (toPath name);
inherit (builtins) getEnv pathExists;
configFile = getEnv "NIXPKGS_CONFIG";
homeDir = getEnv "HOME";
@ -55,8 +52,8 @@ let
configExpr =
if config_ != null then config_
else if configFile != "" && pathExists configFile then import (toPath configFile)
else if homeDir != "" && pathExists configFile2 then import (toPath configFile2)
else if configFile != "" && pathExists configFile then import configFile
else if homeDir != "" && pathExists configFile2 then import configFile2
else {};
in