2020-04-24 23:36:52 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
This file is a test that makes sure that the `pkgs.nixos` and
|
2022-05-18 14:49:53 +00:00
|
|
|
`pkgs.testers.nixosTest` functions work. It's far from a perfect test suite,
|
2020-04-24 23:36:52 +00:00
|
|
|
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 lib.optionalAttrs stdenv.hostPlatform.isLinux (
|
|
|
|
pkgs.recurseIntoAttrs {
|
|
|
|
|
|
|
|
nixos-test = (pkgs.nixos {
|
|
|
|
system.nixos = dummyVersioning;
|
|
|
|
boot.loader.grub.enable = false;
|
|
|
|
fileSystems."/".device = "/dev/null";
|
2022-05-18 14:49:53 +00:00
|
|
|
system.stateVersion = lib.trivial.release;
|
2020-04-24 23:36:52 +00:00
|
|
|
}).toplevel;
|
|
|
|
|
|
|
|
}
|
|
|
|
)
|