nixpkgs/pkgs/test/nixos-functions/default.nix
Emily f594f608dc tests.nixos-functions: don’t omit derivations on non‐Linux
Hydra can handle packages that `throw` but not attributes that
disappear depending on platform, and it seems okay for evaluation to
fail here for non‐Linux platforms.
2024-10-29 19:42:46 +00:00

30 lines
635 B
Nix

/*
This file is a test that makes sure that the `pkgs.nixos` and
`pkgs.testers.nixosTest` functions work. It's far from a perfect test suite,
but better than not checking them at all on hydra.
To run this test:
nixpkgs$ nix-build -A tests.nixos-functions
*/
{ pkgs, lib, stdenv, ... }:
let
dummyVersioning = {
revision = "test";
versionSuffix = "test";
label = "test";
};
in pkgs.recurseIntoAttrs {
nixos-test = (pkgs.nixos {
system.nixos = dummyVersioning;
boot.loader.grub.enable = false;
fileSystems."/".device = "/dev/null";
system.stateVersion = lib.trivial.release;
}).toplevel;
}