top-level: builtins.toPath no longer needed

This commit is contained in:
John Ericson 2016-06-21 00:06:23 -07:00
parent 20a8349d62
commit 98b9403a22

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