diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2016-06-21 00:06:23 -0700 |
---|---|---|
committer | John Ericson <Ericson2314@Yahoo.com> | 2016-06-21 00:19:00 -0700 |
commit | 98b9403a2227ce1e626c96b49955ea22d7f9c715 (patch) | |
tree | edbcfdee7331d041b8efd7d93c5485c5acbc299f /pkgs/top-level/default.nix | |
parent | 20a8349d625814d6c7d9ad39f2b83a2a02e999f5 (diff) | |
download | nixpkgs-98b9403a2227ce1e626c96b49955ea22d7f9c715.tar nixpkgs-98b9403a2227ce1e626c96b49955ea22d7f9c715.tar.gz nixpkgs-98b9403a2227ce1e626c96b49955ea22d7f9c715.tar.bz2 nixpkgs-98b9403a2227ce1e626c96b49955ea22d7f9c715.tar.lz nixpkgs-98b9403a2227ce1e626c96b49955ea22d7f9c715.tar.xz nixpkgs-98b9403a2227ce1e626c96b49955ea22d7f9c715.tar.zst nixpkgs-98b9403a2227ce1e626c96b49955ea22d7f9c715.zip |
top-level: builtins.toPath no longer needed
Diffstat (limited to 'pkgs/top-level/default.nix')
-rw-r--r-- | pkgs/top-level/default.nix | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pkgs/top-level/default.nix b/pkgs/top-level/default.nix index 22964195ed6..bf3522d5946 100644 --- a/pkgs/top-level/default.nix +++ b/pkgs/top-level/default.nix @@ -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 |