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

Bring back multiple output for binaries #32082

Closed
domenkozar opened this issue Nov 26, 2017 · 11 comments
Closed

Bring back multiple output for binaries #32082

domenkozar opened this issue Nov 26, 2017 · 11 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: haskell

Comments

@domenkozar
Copy link
Member

@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

@Fuuzetsu
Copy link
Member

It needs testing on hydra that it doesn't break anything else... I have wasted days fixing one thing and breaking another in this code ;/

@nc6
Copy link
Contributor

nc6 commented Nov 27, 2017

I'll resurrect the PR, I did have a somewhat updated version

nc6 added a commit to nc6/nixpkgs that referenced this issue Nov 27, 2017
@nc6
Copy link
Contributor

nc6 commented Nov 27, 2017

#32112 opened with your fix, needs hydra testing.

@vcunat
Copy link
Member

vcunat commented Dec 4, 2017

Merged to master, but not all caveats seems solved yet.

@domenkozar
Copy link
Member Author

@vcunat what's missing?

@vcunat
Copy link
Member

vcunat commented Dec 5, 2017

@domenkozar: see the end of that PR's discussion: #32112

@domenkozar
Copy link
Member Author

domenkozar commented Dec 10, 2017

FYI: I have fixed ghcWithPackages and a few linux build failures.

What is left is:

  • ghcWithPackages
  • hevm
  • ghcjsHEAD
  • agda-prelude
  • happy on darwin
  • cabal2nix postInstall fixes
  • tests

@domenkozar
Copy link
Member Author

#32629

@domenkozar
Copy link
Member Author

#58525 has landed and I've backported it to 18.09 and 19.03.

I think enabling this by default is big effort, but it's great that this feature is now available as a better way to justStaticExecutable. Maybe that should be now removed or do the bin splitting?

@chreekat
Copy link
Contributor

@domenkozar would it be correct to say this issue can be closed, perhaps if you open a more specific issue about any remaining quibbles?

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@Artturin Artturin closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: haskell
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants