Use different method to detect relative paths

see https://github.com/edolstra/flake-compat/pull/18
This commit is contained in:
Benjamin Koch 2021-01-24 05:04:36 +01:00
parent 43a4aaabd9
commit d3b9c42cb7

View file

@ -44,7 +44,7 @@ let
}) })
else if info.type == "path" then else if info.type == "path" then
{ outPath = builtins.path { { outPath = builtins.path {
path = if builtins.substring 0 1 info.path == "." path = if builtins.substring 0 1 info.path != "/"
then src + ("/" + info.path) then src + ("/" + info.path)
else info.path; }; else info.path; };
narHash = info.narHash; narHash = info.narHash;