mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
93abb7bef7
And improve the test a bit, to assert correct wiring of `pkgs`.
31 lines
652 B
Nix
31 lines
652 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 lib.optionalAttrs stdenv.hostPlatform.isLinux (
|
|
pkgs.recurseIntoAttrs {
|
|
|
|
nixos-test = (pkgs.nixos {
|
|
system.nixos = dummyVersioning;
|
|
boot.loader.grub.enable = false;
|
|
fileSystems."/".device = "/dev/null";
|
|
}).toplevel;
|
|
|
|
}
|
|
)
|