1/*
2
3This file is a test that makes sure that the `pkgs.nixos` and
4`pkgs.testers.nixosTest` functions work. It's far from a perfect test suite,
5but better than not checking them at all on hydra.
6
7To run this test:
8
9 nixpkgs$ nix-build -A tests.nixos-functions
10
11 */
12{ pkgs, lib, stdenv, ... }:
13
14let
15 dummyVersioning = {
16 revision = "test";
17 versionSuffix = "test";
18 label = "test";
19 };
20in lib.optionalAttrs stdenv.hostPlatform.isLinux (
21 pkgs.recurseIntoAttrs {
22
23 nixos-test = (pkgs.nixos {
24 system.nixos = dummyVersioning;
25 boot.loader.grub.enable = false;
26 fileSystems."/".device = "/dev/null";
27 system.stateVersion = lib.trivial.release;
28 }).toplevel;
29
30 }
31)