2020-10-26 02:13:52 +00:00
|
|
|
{ maintainer }:
|
|
|
|
let
|
2023-05-22 21:26:58 +00:00
|
|
|
pkgs = import ./../../default.nix {
|
|
|
|
config.allowAliases = false;
|
|
|
|
};
|
2023-05-22 21:27:19 +00:00
|
|
|
inherit (pkgs) lib;
|
2020-10-26 02:13:52 +00:00
|
|
|
maintainer_ = pkgs.lib.maintainers.${maintainer};
|
|
|
|
packagesWith = cond: return: prefix: set:
|
2023-05-22 21:27:19 +00:00
|
|
|
(lib.flatten
|
|
|
|
(lib.mapAttrsToList
|
2020-10-26 02:13:52 +00:00
|
|
|
(name: pkg:
|
|
|
|
let
|
|
|
|
result = builtins.tryEval
|
|
|
|
(
|
2023-05-22 21:27:19 +00:00
|
|
|
if lib.isDerivation pkg && cond name pkg then
|
2020-10-26 02:13:52 +00:00
|
|
|
# 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 "${prefix}${name}") ]
|
|
|
|
else if pkg.recurseForDerivations or false || pkg.recurseForRelease or false
|
|
|
|
# then packagesWith cond return pkg
|
|
|
|
then packagesWith cond return "${name}." pkg
|
|
|
|
else [ ]
|
|
|
|
);
|
|
|
|
in
|
|
|
|
if result.success then result.value
|
|
|
|
else [ ]
|
|
|
|
)
|
|
|
|
set
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
packages = packagesWith
|
|
|
|
(name: pkg:
|
|
|
|
(
|
|
|
|
if builtins.hasAttr "meta" pkg && builtins.hasAttr "maintainers" pkg.meta
|
|
|
|
then
|
|
|
|
(
|
|
|
|
if builtins.isList pkg.meta.maintainers
|
|
|
|
then builtins.elem maintainer_ pkg.meta.maintainers
|
|
|
|
else maintainer_ == pkg.meta.maintainers
|
|
|
|
)
|
|
|
|
else false
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(name: name)
|
2023-05-22 21:27:19 +00:00
|
|
|
""
|
2020-10-26 02:13:52 +00:00
|
|
|
pkgs;
|
|
|
|
|
|
|
|
in
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
name = "nixpkgs-update-script";
|
2021-05-07 17:32:10 +00:00
|
|
|
buildInputs = [ pkgs.hydra-check ];
|
2020-10-26 02:13:52 +00:00
|
|
|
buildCommand = ''
|
|
|
|
echo ""
|
|
|
|
echo "----------------------------------------------------------------"
|
|
|
|
echo ""
|
|
|
|
echo "nix-shell maintainers/scripts/check-hydra-by-maintainer.nix --argstr maintainer SuperSandro2000"
|
|
|
|
echo ""
|
|
|
|
echo "----------------------------------------------------------------"
|
|
|
|
exit 1
|
|
|
|
'';
|
|
|
|
shellHook = ''
|
|
|
|
unset shellHook # do not contaminate nested shells
|
|
|
|
echo "Please stand by"
|
|
|
|
echo nix-shell -p hydra-check --run "hydra-check ${builtins.concatStringsSep " " packages}"
|
|
|
|
nix-shell -p hydra-check --run "hydra-check ${builtins.concatStringsSep " " packages}"
|
|
|
|
exit $?
|
|
|
|
'';
|
|
|
|
}
|