Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building system, caused by extraModuleSources #206

Open
NomAnor opened this issue Jul 23, 2023 · 0 comments
Open

Error when building system, caused by extraModuleSources #206

NomAnor opened this issue Jul 23, 2023 · 0 comments

Comments

@NomAnor
Copy link

NomAnor commented Jul 23, 2023

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant