2018-10-25 15:58:11 +02:00
|
|
|
/*
|
|
|
|
|
|
|
|
This file is a test that makes sure that the `pkgs.nixos` and
|
2022-05-09 14:04:29 +02:00
|
|
|
`pkgs.testers.nixosTest` functions work. It's far from a perfect test suite,
|
2018-10-25 15:58:11 +02:00
|
|
|
but better than not checking them at all on hydra.
|
|
|
|
|
|
|
|
To run this test:
|
|
|
|
|
|
|
|
nixpkgs$ nix-build -A tests.nixos-functions
|
|
|
|
|
|
|
|
*/
|
2018-10-02 21:49:54 +02:00
|
|
|
{ pkgs, lib, stdenv, ... }:
|
|
|
|
|
2018-11-19 20:26:52 +01:00
|
|
|
let
|
|
|
|
dummyVersioning = {
|
|
|
|
revision = "test";
|
|
|
|
versionSuffix = "test";
|
|
|
|
label = "test";
|
|
|
|
};
|
|
|
|
in lib.optionalAttrs stdenv.hostPlatform.isLinux (
|
2018-10-02 21:49:54 +02:00
|
|
|
pkgs.recurseIntoAttrs {
|
|
|
|
|
|
|
|
nixos-test = (pkgs.nixos {
|
2018-11-19 20:26:52 +01:00
|
|
|
system.nixos = dummyVersioning;
|
2018-10-02 21:49:54 +02:00
|
|
|
boot.loader.grub.enable = false;
|
|
|
|
fileSystems."/".device = "/dev/null";
|
2022-05-05 12:51:39 +02:00
|
|
|
system.stateVersion = lib.trivial.release;
|
2018-10-02 21:49:54 +02:00
|
|
|
}).toplevel;
|
|
|
|
|
|
|
|
}
|
|
|
|
)
|