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
Don't hardcode $doc #416
Don't hardcode $doc #416
Conversation
Split outputs can be disabled, in which case $doc is the empty string. `outputDoc` always points to the right output variable name (either "out" or "doc"). See also NixOS/nixpkgs#61526.
Thanks @peti! |
Um, where is that variable
|
@peti Hmm that is bad, it worked in other places. It's documented here: https://nixos.org/nixpkgs/manual/#multiple-output-file-type-groups @matthewbauer are there exceptions to where this works? |
@@ -291,8 +291,8 @@ darcsInstallPostInstall = unlines | |||
xmonadPostInstall :: String | |||
xmonadPostInstall = unlines | |||
[ "postInstall = ''" | |||
, " install -D man/xmonad.1 $doc/share/man/man1/xmonad.1" | |||
, " install -D man/xmonad.hs $doc/share/doc/$name/sample-xmonad.hs" | |||
, " install -D man/xmonad.1 ${!outputDoc}/share/man/man1/xmonad.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need two ticks for this to work like:
''${!outputDoc}
Otherwise Nix thinks it is a variable (as opposed to a bash variable)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah of course, sorry for that @peti. I will PR the fix. I must have copy-pasted it incorrectly from the other nixpkgs editor buffer.
Likely fix in #417 |
Split outputs can be disabled, in which case $doc is the empty string.
outputDoc
always points to the right output variable name(either "out" or "doc").
See also NixOS/nixpkgs#61526.