2020-05-09 15:22:20 +00:00
|
|
|
{ maintainer }:
|
|
|
|
|
|
|
|
# based on update.nix
|
|
|
|
# nix-build build.nix --argstr maintainer <yourname>
|
|
|
|
|
|
|
|
let
|
|
|
|
pkgs = import ./../../default.nix {};
|
|
|
|
maintainer_ = pkgs.lib.maintainers.${maintainer};
|
|
|
|
packagesWith = cond: return: set:
|
|
|
|
(pkgs.lib.flatten
|
|
|
|
(pkgs.lib.mapAttrsToList
|
|
|
|
(name: pkg:
|
|
|
|
let
|
|
|
|
result = builtins.tryEval
|
|
|
|
(
|
2020-09-10 08:27:21 +00:00
|
|
|
if pkgs.lib.isDerivation pkg && cond name pkg then
|
|
|
|
# Skip packages whose closure fails on evaluation.
|
|
|
|
# This happens for pkgs like `python27Packages.djangoql`
|
|
|
|
# that have disabled Python pkgs as dependencies.
|
|
|
|
builtins.seq pkg.outPath
|
|
|
|
[ (return name pkg) ]
|
2020-05-09 15:22:20 +00:00
|
|
|
else if pkg.recurseForDerivations or false || pkg.recurseForRelease or false
|
|
|
|
then packagesWith cond return pkg
|
|
|
|
else [ ]
|
|
|
|
);
|
|
|
|
in
|
|
|
|
if result.success then result.value
|
|
|
|
else [ ]
|
|
|
|
)
|
|
|
|
set
|
|
|
|
)
|
|
|
|
);
|
|
|
|
in
|
|
|
|
packagesWith
|
|
|
|
(name: pkg:
|
|
|
|
(
|
2020-09-09 07:54:03 +00:00
|
|
|
if builtins.hasAttr "meta" pkg && builtins.hasAttr "maintainers" pkg.meta
|
2020-05-09 15:22:20 +00:00
|
|
|
then (
|
|
|
|
if builtins.isList pkg.meta.maintainers
|
|
|
|
then builtins.elem maintainer_ pkg.meta.maintainers
|
|
|
|
else maintainer_ == pkg.meta.maintainers
|
|
|
|
)
|
|
|
|
else false
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(name: pkg: pkg)
|
|
|
|
pkgs
|