Skip to content

Commit

Permalink
haskell/with-packages-wrapper.nix: install "doc" outputs
Browse files Browse the repository at this point in the history
We were previously just installing the "out" output which broke when
we recently changed to generating multiple outputs.

Fixes NixOS#76837
  • Loading branch information
matthewbauer committed Jan 2, 2020
1 parent a77a2cf commit e915608
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -1,4 +1,4 @@
{ lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
{ lib, stdenv, ghc, llvmPackages, packages, buildEnv, makeWrapper
, withLLVM ? false
, postBuild ? ""
, ghcLibdir ? null # only used by ghcjs, when resolving plugins
Expand Down Expand Up @@ -51,12 +51,13 @@ let
++ lib.optional stdenv.targetPlatform.isDarwin llvmPackages.clang);
in
if paths == [] && !withLLVM then ghc else
symlinkJoin {
buildEnv {
# this makes computing paths from the name attribute impossible;
# if such a feature is needed, the real compiler name should be saved
# as a dedicated drv attribute, like `compiler-name`
name = ghc.name + "-with-packages";
paths = paths ++ [ghc];
extraOutputsToInstall = ["doc"];

This comment has been minimized.

Copy link
@GuillaumeDesforges

GuillaumeDesforges Jan 3, 2020

Does this line copy the doc directory to the ghc-with-packages nix store entry ?
Then, would it be accessible like this ?

"${ghc-with-packages}/share/doc/hoogle/default.hoo"

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Jan 3, 2020

Author Owner

This copies the doc output, which may or may not be where the doc directory lives. The above line should work without this change since we are already generating hoogle below.

This change makes things like "${ghc-with-packages}/share/doc/ghc/html" work because the GHC derivation includes them in the doc output.

postBuild = ''
. ${makeWrapper}/nix-support/setup-hook
Expand Down

0 comments on commit e915608

Please sign in to comment.