git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #16384 from Ericson2314/top-level-to-path

top-level: builtins.toPath no longer needed

commitafbba2bffa8ce4b627e6dfc7d3c76909bb959144 authorzimbatm <zimbatm@zimbatm.com> dateTue 21 Jun 2016, 14:21 (10 years ago) parentf3950f798b9403
1 file changed+3−6
pkgs/top-level/default.nix+3−6
pkgs/top-level/default.nix+3−6
@@ -44,10 +44,7 @@ let
4444 # for NIXOS (nixos-rebuild): use nixpkgs.config option
4545 config =
4646 let
47− toPath = builtins.toPath;
48− getEnv = builtins.getEnv;
49− pathExists = name:
50− builtins.pathExists (toPath name);
47+ inherit (builtins) getEnv pathExists;
5148
5249 configFile = getEnv "NIXPKGS_CONFIG";
5350 homeDir = getEnv "HOME";
@@ -55,8 +52,8 @@ let
5552
5653 configExpr =
5754 if config_ != null then config_
58− else if configFile != "" && pathExists configFile then import (toPath configFile)
59− else if homeDir != "" && pathExists configFile2 then import (toPath configFile2)
55+ else if configFile != "" && pathExists configFile then import configFile
56+ else if homeDir != "" && pathExists configFile2 then import configFile2
6057 else {};
6158
6259 in