Fix evaluation of haskellLib.collectComponents (#479)

This commit is contained in:
Rodney Lorrimar 2020-03-09 20:47:26 +10:00 committed by GitHub
parent 89e3e78719
commit 0933c58908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, lib, haskellLib, runCommand, git, srcOnly }:
{ stdenv, lib, haskellLib, runCommand, git, recurseIntoAttrs, srcOnly }:
with haskellLib;
@ -145,12 +145,12 @@ with haskellLib;
# set recurseForDerivations unless it's a derivation itself (e.g. the "library" component) or an empty set
in if lib.isDerivation components || components == {}
then components
else pkgs.recurseIntoAttrs components;
else recurseIntoAttrs components;
packageFilter = name: package: (package.isHaskell or false) && packageSel package;
filteredPkgs = lib.filterAttrs packageFilter haskellPackages;
# at this point we can filter out packages that don't have any of the given kind of component
packagesByComponent = lib.filterAttrs (_: components: components != {}) (lib.mapAttrs packageToComponents filteredPkgs);
in pkgs.recurseIntoAttrs packagesByComponent;
in recurseIntoAttrs packagesByComponent;
# Equivalent to collectComponents with (_: true) as selection function.
# Useful for pre-filtered package-set.

View File

@ -59,7 +59,7 @@ self: super: {
# Utility functions for working with the component builder.
haskellLib = let hl = import ../lib {
inherit (self) stdenv lib runCommand srcOnly;
inherit (self) stdenv lib runCommand recurseIntoAttrs srcOnly;
inherit (self.buildPackages) git;
haskellLib = hl;
}; in hl;

View File

@ -7,7 +7,7 @@ in pkgs.lib.evalModules {
_module.args = {
# this is *not* the hasekllLib from nixpkgs; it is rather our own
# library from haskell.nix
haskellLib = let hl = import ./lib { inherit lib; inherit (pkgs) stdenv runCommand git srcOnly; haskellLib = hl; }; in hl;
haskellLib = let hl = import ./lib { inherit lib; inherit (pkgs) stdenv runCommand recurseIntoAttrs git srcOnly; haskellLib = hl; }; in hl;
# The package descriptions depend on pkgs, which are used to resolve system package dependencies
# as well as pkgconfPkgs, which are used to resolve pkgconfig name to nixpkgs names. We simply

View File

@ -63,7 +63,7 @@ in recurseIntoAttrs {
meta.platforms = platforms.all;
passthru = {
inherit (packages) project;
inherit project;
};
};
}