python312Packages.aiohomeconnect: 0.10.0 -> 0.11.0 (#374011)
[NixPkgs.git] / nixos / modules / system / activation / test.nix
blobfe8acb708868c8b5d83da73fed9a08d3f95fc8b7
2   lib,
3   nixos,
4   expect,
5   testers,
6 }:
7 let
8   node-forbiddenDependencies-fail = nixos (
9     { ... }:
10     {
11       system.forbiddenDependenciesRegexes = [ "-dev$" ];
12       environment.etc."dev-dependency" = {
13         text = "${expect.dev}";
14       };
15       documentation.enable = false;
16       fileSystems."/".device = "ignore-root-device";
17       boot.loader.grub.enable = false;
18     }
19   );
20   node-forbiddenDependencies-succeed = nixos (
21     { ... }:
22     {
23       system.forbiddenDependenciesRegexes = [ "-dev$" ];
24       system.extraDependencies = [ expect.dev ];
25       documentation.enable = false;
26       fileSystems."/".device = "ignore-root-device";
27       boot.loader.grub.enable = false;
28     }
29   );
31 lib.recurseIntoAttrs {
32   test-forbiddenDependencies-fail = testers.testBuildFailure node-forbiddenDependencies-fail.config.system.build.toplevel;
33   test-forbiddenDependencies-succeed =
34     node-forbiddenDependencies-succeed.config.system.build.toplevel;