-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
haskell: envForPackages (hs: with hs; [A B]) should contain all dependencies of A and B, but not A, B themselves #23023
Conversation
@chpatrick, thanks for your PR! By analyzing the history of the files in this pull request, we identified @peti, @cstrahan and @basvandijk to be potential reviewers. |
This change is unnecessary. Just override |
So your suggestion is to replicate
in our env script to find all the deps and always keep it up to date with |
Replicating that seems excessive and error-prone. Another approach would be to put { passthru = passthru // {
envBuildInputs = [ ghcEnv systemBuildInputs ]
++ optional isGhcjs ghc."socket.io"; # for ghcjsi
};
} It would also be nice to have a function like pkgs.haskellPackages.envForPackages (hsPkgs: with hsPkgs; [scientific attoparsec]) which will then take all the |
How exactly is that different from My understanding is that |
I guess what @chpatrick needs is to be able to create an environment in which all the dependencies of A and B are available except for A and B themselves. The problem with: ghcWithPackages (hs: with hs; [A B]) is that it will also make A and B available. I guess this makes it problematic to work on these packages. @chpatrick is my understanding of your problem correct? The idea behind: envForPackages (hs: with hs; [A B]) is that it will make all the dependencies of A and B available except for A and B themselves. |
Yes, that's correct. We have some packages that build incredibly slowly outside of |
Okay, I think I got it. I believe this function is going to be fairly simple to provide. I'll suggest a solution in a bit. |
This issue is addressed by #36393. |
Motivation for this change
In our project we have packages A and B, such that B depends on package A. We would like to be able to get a shell environment where can incrementally work on both packages, but this currently doesn't seem possible. If we expose these variables, we can make our own environment that combines the two packages' dependencies.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)