Merge pull request #16384 from Ericson2314/top-level-to-path
top-level: builtins.toPath no longer needed
This commit is contained in:
commit
afbba2bffa
@ -44,10 +44,7 @@ let
|
|||||||
# for NIXOS (nixos-rebuild): use nixpkgs.config option
|
# for NIXOS (nixos-rebuild): use nixpkgs.config option
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
toPath = builtins.toPath;
|
inherit (builtins) getEnv pathExists;
|
||||||
getEnv = builtins.getEnv;
|
|
||||||
pathExists = name:
|
|
||||||
builtins.pathExists (toPath name);
|
|
||||||
|
|
||||||
configFile = getEnv "NIXPKGS_CONFIG";
|
configFile = getEnv "NIXPKGS_CONFIG";
|
||||||
homeDir = getEnv "HOME";
|
homeDir = getEnv "HOME";
|
||||||
@ -55,8 +52,8 @@ let
|
|||||||
|
|
||||||
configExpr =
|
configExpr =
|
||||||
if config_ != null then config_
|
if config_ != null then config_
|
||||||
else if configFile != "" && pathExists configFile then import (toPath configFile)
|
else if configFile != "" && pathExists configFile then import configFile
|
||||||
else if homeDir != "" && pathExists configFile2 then import (toPath configFile2)
|
else if homeDir != "" && pathExists configFile2 then import configFile2
|
||||||
else {};
|
else {};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user