mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
release-haskell.nix: use glob constituents in aggregates
The aggregates evaluated every constituent twice, once inside a single evaluator worker and once as its own job. Evaluating the mergeable aggregate alone drops from 1.3 GB / 15 s to 73 MB / 0.4 s.
This commit is contained in:
@@ -26,26 +26,6 @@ let
|
||||
pkgs
|
||||
;
|
||||
|
||||
# Helper function which traverses a (nested) set
|
||||
# of derivations produced by mapTestOn and flattens
|
||||
# it to a list of derivations suitable to be passed
|
||||
# to `releaseTools.aggregate` as constituents.
|
||||
# Removes all non derivations from the input jobList.
|
||||
#
|
||||
# accumulateDerivations :: [ Either Derivation AttrSet ] -> [ Derivation ]
|
||||
#
|
||||
# > accumulateDerivations [ drv1 "string" { foo = drv2; bar = { baz = drv3; }; } ]
|
||||
# [ drv1 drv2 drv3 ]
|
||||
accumulateDerivations =
|
||||
jobList:
|
||||
lib.concatMap (
|
||||
attrs:
|
||||
if lib.isDerivation attrs then
|
||||
[ attrs ]
|
||||
else
|
||||
lib.optionals (lib.isAttrs attrs) (accumulateDerivations (lib.attrValues attrs))
|
||||
) jobList;
|
||||
|
||||
# names of all subsets of `pkgs.haskell.packages`
|
||||
#
|
||||
# compilerNames looks like the following:
|
||||
@@ -632,34 +612,35 @@ let
|
||||
'';
|
||||
teams = [ lib.teams.haskell ];
|
||||
};
|
||||
constituents = accumulateDerivations [
|
||||
globConstituents = true;
|
||||
constituents = [
|
||||
# haskell specific tests
|
||||
jobs.tests.haskell
|
||||
"tests.haskell.*"
|
||||
# important top-level packages
|
||||
jobs.cabal-install
|
||||
jobs.cabal2nix
|
||||
jobs.cachix
|
||||
jobs.darcs
|
||||
jobs.haskell-language-server
|
||||
jobs.hledger
|
||||
jobs.hledger-ui
|
||||
jobs.hpack
|
||||
jobs.niv
|
||||
jobs.pandoc
|
||||
jobs.stack
|
||||
jobs.stylish-haskell
|
||||
jobs.shellcheck
|
||||
"cabal-install.*"
|
||||
"cabal2nix.*"
|
||||
"cachix.*"
|
||||
"darcs.*"
|
||||
"haskell-language-server.*"
|
||||
"hledger.*"
|
||||
"hledger-ui.*"
|
||||
"hpack.*"
|
||||
"niv.*"
|
||||
"pandoc.*"
|
||||
"stack.*"
|
||||
"stylish-haskell.*"
|
||||
"shellcheck.*"
|
||||
# important haskell (library) packages
|
||||
jobs.haskellPackages.cabal-plan
|
||||
jobs.haskellPackages.distribution-nixpkgs
|
||||
jobs.haskellPackages.hackage-db
|
||||
jobs.haskellPackages.xmonad
|
||||
jobs.haskellPackages.xmonad-contrib
|
||||
"haskellPackages.cabal-plan.*"
|
||||
"haskellPackages.distribution-nixpkgs.*"
|
||||
"haskellPackages.hackage-db.*"
|
||||
"haskellPackages.xmonad.*"
|
||||
"haskellPackages.xmonad-contrib.*"
|
||||
# haskell packages maintained by @peti
|
||||
# imported from the old hydra jobset
|
||||
jobs.haskellPackages.hopenssl
|
||||
jobs.haskellPackages.hsemail
|
||||
jobs.haskellPackages.hsyslog
|
||||
"haskellPackages.hopenssl.*"
|
||||
"haskellPackages.hsemail.*"
|
||||
"haskellPackages.hsyslog.*"
|
||||
];
|
||||
};
|
||||
maintained = pkgs.releaseTools.aggregate {
|
||||
@@ -668,9 +649,8 @@ let
|
||||
description = "Aggregate jobset of all haskell packages with a maintainer";
|
||||
teams = [ lib.teams.haskell ];
|
||||
};
|
||||
constituents = accumulateDerivations (
|
||||
map (name: jobs.haskellPackages."${name}") (maintainedPkgNames pkgs.haskellPackages)
|
||||
);
|
||||
globConstituents = true;
|
||||
constituents = map (name: "haskellPackages.${name}.*") (maintainedPkgNames pkgs.haskellPackages);
|
||||
};
|
||||
|
||||
muslGHCs = pkgs.releaseTools.aggregate {
|
||||
@@ -681,9 +661,10 @@ let
|
||||
nh2
|
||||
];
|
||||
};
|
||||
constituents = accumulateDerivations [
|
||||
jobs.pkgsMusl.haskell.compiler.ghcHEAD
|
||||
jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
|
||||
globConstituents = true;
|
||||
constituents = [
|
||||
"pkgsMusl.haskell.compiler.ghcHEAD.*"
|
||||
"pkgsMusl.haskell.compiler.native-bignum.ghcHEAD.*"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -696,9 +677,10 @@ let
|
||||
lib.maintainers.rnhmjoj
|
||||
];
|
||||
};
|
||||
constituents = accumulateDerivations [
|
||||
jobs.pkgsStatic.haskell.packages.native-bignum.ghc948 # non-hadrian
|
||||
jobs.pkgsStatic.haskellPackages
|
||||
globConstituents = true;
|
||||
constituents = [
|
||||
"pkgsStatic.haskell.packages.native-bignum.ghc948.*" # non-hadrian
|
||||
"pkgsStatic.haskellPackages.*"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user