mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-18 05:33:56 +01:00
This factors out `meta.maintainers` from NixOS `misc/meta.nix` for use in arbitrary Module System applications. It is useful beyond NixOS and not coupled to it, although it is currently coupled to Nixpkgs' `lib.maintainers`. That restriction could be lifted optionally if there's future demand.
35 lines
680 B
Nix
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
|