mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-09-11 06:55:40 +03:00
Fix evaluation of haskellLib.collectComponents (#479)
This commit is contained in:
parent
89e3e78719
commit
0933c58908
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -63,7 +63,7 @@ in recurseIntoAttrs {
|
||||
|
||||
meta.platforms = platforms.all;
|
||||
passthru = {
|
||||
inherit (packages) project;
|
||||
inherit project;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user