NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.09k stars 14.07k forks source link

haskell: buildTools no longer included in env #30114

Open doshitan opened 7 years ago

doshitan commented 7 years ago

Short version

Something like http://lpaste.net/8194447006882594816 in a shell.nix would result in cabal-install being available to build the project with a simple nix-shell. Since 8a8f0408cd9b7fdda1095718107c800057658c44 it no longer does.

Longer version

8a8f0408cd9b7fdda1095718107c800057658c44 moved buildTools (and setupHaskellDepends, among others) from otherBuildInputs to a new attribute nativeBuildInputs. These are then used as the nativeBuildInputs for the packages main derivation and otherBuildInputs are now regular buildInputs, but the env derivation was never updated to handle this split, so while previously the stuff now listed as nativeBuildInputs where included in env, they are not any longer.

Just adding the top level nativeBuildInputs to the nativeBuildInputs of the env derivation works and "feels" right since the build environment should have all the build tool related things in it. But I wasn't sure if that was the best solution since in e69c7f5641 @peti just moved the setupHaskellDepends into otherBuildInputs in order for them to picked up in env after they had been explicitly moved out of otherBuildInputs in 8a8f0408cd9b7fdda1095718107c800057658c44 and I don't know exactly how everything inter-plays, esp. with cross-compilation plans.

twhitehead commented 6 years ago

Just ran into this myself. Would be great if it could be fixed.

I'm happy to submit a pull request with @doshitan suggestion above (just making nativeBuildInputs in env a copy of buildInputs) if that would help.

stale[bot] commented 4 years ago

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.