Skip to content

Bring back multiple output for binaries #32082

@domenkozar

Description

@domenkozar

@peti reverted #27209 since it broke haskell packages

The fix is quite simple:

diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index ec7d961581a..725a2812f94 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -43,7 +43,7 @@ let
   libDir        = if isHaLVM then "$out/lib/HaLVM-${ghc.version}" else "$out/lib/${ghcCommand}-${ghc.version}";
   docDir        = "$out/share/doc/ghc/html";
   packageCfgDir = "${libDir}/package.conf.d";
-  paths         = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);
+  paths         = map lib.getLib (lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages));
   hasLibraries  = lib.any (x: x.isHaskellLibrary) paths;
   # CLang is needed on Darwin for -fllvm to work:
   # https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/code-generators.html

and a proof:

$ nix-shell -p "haskellPackages.ghcWithPackages (ps: [ps.mtl])" --run "ghc-pkg list mtl" -I ~/dev
these derivations will be built:
  /nix/store/ri4g0qry776qgirvw4wm4xb7yqsfbagv-ghc-8.0.2-with-packages.drv
building path(s) ‘/nix/store/s8ja7k00cd9ffd0h9prcaivmjgvdh8bd-ghc-8.0.2-with-packages’
/nix/store/s8ja7k00cd9ffd0h9prcaivmjgvdh8bd-ghc-8.0.2-with-packages/lib/ghc-8.0.2/package.conf.d
    mtl-2.2.1

cc @nc6

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: haskellGeneral-purpose, statically typed, purely functional programming language

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions