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

Don't hardcode $doc #416

Merged
merged 1 commit into from May 20, 2019
Merged

Don't hardcode $doc #416

merged 1 commit into from May 20, 2019

Conversation

nh2
Copy link
Contributor

@nh2 nh2 commented May 15, 2019

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.

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.
@peti peti merged commit cf0e975 into NixOS:master May 20, 2019
@nh2
Copy link
Contributor Author

nh2 commented May 20, 2019

Thanks @peti!

@peti
Copy link
Member

peti commented May 20, 2019

Um, where is that variable outputDoc supposed to come from? According to https://hydra.nixos.org/jobset/nixpkgs/haskell-updates#tabs-errors, it appears undefined:

hydra-eval-jobs returned exit code 1:
error: undefined variable 'outputDoc' at /nix/store/mjadx69m3nwyhiilm46w1ysihnprzcih-source/pkgs/development/haskell-modules/hackage-packages.nix:248972:37

@nh2
Copy link
Contributor Author

nh2 commented May 20, 2019

@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"
Copy link
Member

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)

Copy link
Contributor Author

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.

nh2 added a commit to nh2/cabal2nix that referenced this pull request May 20, 2019
@nh2
Copy link
Contributor Author

nh2 commented May 20, 2019

Likely fix in #417

Profpatsch pushed a commit to Profpatsch/cabal2nix that referenced this pull request Mar 7, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants