Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem
Currently
nix build github:rustshop/flakebox#docs
and therefore alsoflakebox docs
fails.With this change the build succeeds
nix build github:taliyahwebb/flakebox/docs-fix#docs
Basic Analysis
In my testing i figured out that the stdenv default builder tries to execute the output of the internal
optionsDocMd
derivation which is added to the docsbuildInputs
.From as far as I can tell this only happens when a derivation is created from
pkgs.runCommand
and writes directly to$out
instead of creating a directory and putting a file in that.Details
I was able to find out that during
source $stdenv/setup
any derivation output that is formed like described above is attempted to be executed by what i assume to bebash
.I was unable to investigate a further cause and didn't find any documentation or mention of this behavior so this might be a
nixpkgs.stdenv
bug?Alternative Fix
An alternative fix for the build failure that I attempted was to simply remove
optionsDocMd
frombuildInputs
but keep it during build phase, which seemed to work initially.I am not familiar enough with nix yet to know if that would cause any unwanted side effects and thus decided to make a fixing change to the
optionsDocMd
derivation instead.