-
Notifications
You must be signed in to change notification settings - Fork 69
Description
I'm trying to build a nixos system on my Arch Linux machine. I installed morph with nix-env -iA nixpkgs.morph.
When I run morph build network.nix, I get this error message:
The manual appears to depend on the location of Nixpkgs, which is bad
since this prevents sharing via the NixOS channel. This is typically
caused by an option default that refers to a relative path (see above
for hints about the offending path).
error: builder for '/nix/store/1p1mknzr1iyfbq6sazcwys8id8zqmxwn-options-docbook.xml.drv' failed with exit code 1;
What I could figure out is, that it is caused by
Line 25 in ef1ad10
| documentation.nixos.extraModuleSources = [ ../. ]; |
On my system this results in prefixesToStrip = [ "/nix/store/vffx27l0k6hgylbcm693w8004i7pm199-nixpkgs-23.05/nixpkgs/" "/nix/store/" ] in
https://github.com/NixOS/nixpkgs/blob/6da4bc6cb07cba1b8e53d139cbf1d2fb8061d967/nixos/doc/manual/default.nix#L32-L33
The stripAnyPrefixes function then applies the list form the back stripping the /nix/store prefix and leaving the rest of the store path, which then triggers the error from above. Setting extraModuleSources to the empty list in my module resolves the issue.
I'm not sure if the part in eval-machines.nix is necessary or if it is an oversight that parent prefixes might not be handled in the correct order.