1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00

Handle <nixpkgs> being a symlink

Fixes #1898.
This commit is contained in:
Eelco Dolstra 2014-06-13 16:46:59 +02:00
parent fd61a8fce2
commit a7d31fe449

View file

@ -12,11 +12,11 @@ let
declarations = map (fn: stripPrefix fn) opt.declarations;
});
prefix = toString pkgs.path;
prefix = toString ../../..;
stripPrefix = fn:
if substring 0 (stringLength prefix) fn == prefix then
substring (add (stringLength prefix) 1) 1000 fn
substring (stringLength prefix + 1) 1000 fn
else
fn;