Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions builder/shell-for.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ let
(removeSelectedInputs (haskellLib.uniqueWithName (lib.concatMap (cfg: cfg.depends) selectedConfigs))
++ additionalPackages);

# For non haskell dependencies (and `pre-existing` haskell packages)
# we want to search all the configs.
allConfigs = selectedConfigs ++
builtins.map (x: (haskellLib.dependToLib x).config) additionalPackages;

# Add the system libraries and build tools of the selected haskell packages to the shell.
# We need to remove any inputs which are selected components (see above).
# `buildInputs`, `propagatedBuildInputs`, and `executableToolDepends` contain component
Expand All @@ -115,10 +120,10 @@ let
# Set up a "dummy" component to use with ghcForComponent.
component = {
depends = packageInputs;
pre-existing = lib.concatMap (x: (haskellLib.dependToLib x).config.pre-existing or []) packageInputs;
libs = lib.concatMap (x: (haskellLib.dependToLib x).config.libs or []) packageInputs;
pkgconfig = lib.concatMap (x: (haskellLib.dependToLib x).config.pkgconfig or []) packageInputs;
frameworks = lib.concatMap (x: (haskellLib.dependToLib x).config.frameworks or []) packageInputs;
pre-existing = lib.unique (lib.concatMap (x: (haskellLib.dependToLib x).pre-existing or []) allConfigs);
libs = haskellLib.uniqueWithName (lib.concatMap (x: (haskellLib.dependToLib x).libs or []) allConfigs);
pkgconfig = haskellLib.uniqueWithName (lib.concatMap (x: (haskellLib.dependToLib x).pkgconfig or []) allConfigs);
frameworks = haskellLib.uniqueWithName (lib.concatMap (x: (haskellLib.dependToLib x).frameworks or []) allConfigs);
doExactConfig = false;
};
configFiles = makeConfigFiles {
Expand Down
Loading