Skip to content

Commit

Permalink
update sources.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed May 25, 2021
1 parent e748c5f commit b510cd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nix/sources.nix
Expand Up @@ -98,7 +98,10 @@ let
saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name;
ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}";
in
if ersatz == "" then drv else ersatz;
if ersatz == "" then drv else
# this turns the string into an actual Nix path (for both absolute and
# relative paths)
if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}";

# Ports of functions for older nix versions

Expand Down

0 comments on commit b510cd0

Please sign in to comment.