nixpkgs/modules/generic/meta-maintainers/test.nix
Robert Hensing 02a696bccd ci,modules: Backport additions of #431450
Reason: keep ci directory in sync
- https://github.com/NixOS/nixpkgs/pull/431450#issuecomment-3209546418

This requires that we have a modules directory, in which case the
easy and robust solution is to only port the addition parts of the refactor.
It's about as easy as a .keep file, but more useful.

This means that some duplication is created, but we avoid backporting the
changes to the documentation generation, which is a somewhat complex
component I'd rather not touch until these changes have been proven out
on unstable.
2025-08-21 11:04:19 +02:00

35 lines
680 B
Nix

# Run:
# $ nix-instantiate --eval 'modules/generic/meta-maintainers/test.nix'
#
# Expected output:
# { }
#
# Debugging:
# drop .test from the end of this file, then use nix repl on it
rec {
lib = import ../../../lib;
example = lib.evalModules {
modules = [
../meta-maintainers.nix
{
_file = "eelco.nix";
meta.maintainers = [ lib.maintainers.eelco ];
}
];
};
test =
assert
example.config.meta.maintainers == {
${toString ../meta-maintainers.nix} = [
lib.maintainers.pierron
lib.maintainers.roberth
];
"eelco.nix" = [ lib.maintainers.eelco ];
};
{ };
}
.test