mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
tests: add check for nixpkgs maintainers
The test fails if a nixvim maintainer is also a nixpkgs maintainer.
This commit is contained in:
parent
497ce47593
commit
34c3c026b4
2 changed files with 23 additions and 0 deletions
|
@ -44,6 +44,8 @@
|
|||
inherit pkgs helpers;
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
|
||||
maintainers = import ../tests/maintainers.nix { inherit pkgs; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
21
tests/maintainers.nix
Normal file
21
tests/maintainers.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
lib ? pkgs.lib,
|
||||
}:
|
||||
let
|
||||
inherit (lib) attrNames filter length;
|
||||
nixvimList = import ../lib/maintainers.nix;
|
||||
nixpkgsList = lib.maintainers;
|
||||
duplicates = filter (name: nixpkgsList ? ${name}) (attrNames nixvimList);
|
||||
count = length duplicates;
|
||||
in
|
||||
pkgs.runCommand "maintainers-test" { inherit count duplicates; } ''
|
||||
if [ $count -gt 0 ]; then
|
||||
echo "$count nixvim maintainers are also nixpkgs maintainers:"
|
||||
for name in $duplicates; do
|
||||
echo "- $name"
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
touch $out
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue