From 98b9403a2227ce1e626c96b49955ea22d7f9c715 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 21 Jun 2016 00:06:23 -0700 Subject: [PATCH] top-level: builtins.toPath no longer needed --- pkgs/top-level/default.nix | 9 +++------ 1 file 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