-
|
To make a custom.css file available to the mdBooks generator I tried adding config.constructFiles."custom.css" = {
relPath = "custom.css";
content = "Test CSS";
};to the docs/default.nix file. It crashes the build saying error: Cannot build '/nix/store/fb1vr1aji9b8dj7ziq8byx5ixhslv4r1-mdbook-0.5.2.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/fy9y2ciqdzn76dvlv8bbjww80g62m5fy-mdbook-0.5.2-generated
/nix/store/vh5k0y7c353ijjb6smairshz8a60b93g-mdbook-0.5.2
Last 2 log lines:
> structuredAttrs is enabled
> cp: cannot stat '': No such file or directory
For full logs, run:
nix log /nix/store/fb1vr1aji9b8dj7ziq8byx5ixhslv4r1-mdbook-0.5.2.drvThe full logs do not contain any additional lines. From the other uses of constructFiles in the repo I think this should work and I can't figure out what the issue is. I know I should actually add the file to the books src dir, but I was just trying to get a basic example working first and ran into this issue. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
ah....
Apparently I was actually unaware of this. I thought I tested this... 😞 This will need to be fixed here: nix-wrapper-modules/modules/constructFiles/module.nix Lines 132 to 138 in 9212b9c |
Beta Was this translation helpful? Give feedback.
-
|
Gonna close this discussion because it was actually a bug and now it is fixed. |
Beta Was this translation helpful? Give feedback.
ah....
config.drv.__structuredAttrs = true;Apparently
structuredAttrsdisablespassAsFile??I was actually unaware of this. I thought I tested this...