Skip to content

Commit

Permalink
use global buildInputs for environments
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Jul 29, 2023
1 parent b38938e commit c43eb10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions modules/env.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ let
fi
'';

customBuildInputs =
if isFunction config.buildInputs
then config.buildInputs config.ghc.pkgs
else config.buildInputs;
mkBuildInputs = def:
if isFunction def
then def config.ghc.pkgs
else def;

extraHs = ghc:
if isFunction config.haskellPackages
Expand All @@ -57,7 +57,8 @@ let

buildInputs = let
in
customBuildInputs ++
mkBuildInputs config.buildInputs ++
mkBuildInputs global.buildInputs ++
optional config.hls.enable config.hls.package ++
optional config.ghcid.enable config.ghcid.package ++
[ghcWithPackages]
Expand Down
2 changes: 1 addition & 1 deletion modules/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ with lib;
};

buildInputs = mkOption {
description = mdDoc "Additional non-Haskell dependencies required by all packages.";
description = mdDoc "Additional non-Haskell dependencies provided to all packages and environments.";
type = either (functionTo (listOf package)) (listOf package);
default = [];
};
Expand Down

0 comments on commit c43eb10

Please sign in to comment.