Open Ericson2314 opened 4 years ago
To anyone working on this, take a glance at https://github.com/NixOS/nixpkgs/pulls?utf8=%E2%9C%93&q=is%3Apr+shellFor+ for the history of shellFor
, and https://github.com/NixOS/nixpkgs/pull/46453 in particular.
I think the plan should be to somewhat undo https://github.com/NixOS/nixpkgs/commit/51267d3982dd23d02413c891cccbdd18107a8b44 from that PR, in that .env
will not use shellFor
. Instead, shellFor
would use .env
: The logic from shellFor
that is moved back inside generic-builder
to define the .env
, and the remaining bits of shellFor
are replaced with work-on-multi
, combining the packages into one package from which to get and use a .env
.
Nixpkgs side is is in https://github.com/NixOS/nixpkgs/pull/76349. After that's merged and we switch to 19.09, we can then use it from reflex-platform.
See definition of
shellFor
in https://github.com/NixOS/nixpkgs/blob/8e4c9d15456fd3a35044bcea864d558fade4a021/pkgs/development/haskell-modules/make-package-set.nix#L253-L323 . It works today by splitting the dependencies as "haskell" vs "system", and then making a shell based off of this.This, however, is too coarse-grained. We should instead first combine all the packages as work-ont-multi does. In the cross case we should also make two
ghcWithPackages
calls, one forSetup.hs
with setup depends andbuildHaskellPackages.ghcWithPackages
in addition to the regular one. In the native case, we should combine regular haskell dependencies withsetup-depends
for one bigghcWithPackages
call.