mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
5d594d764e
The good news is that it worked as expected.
23 lines
504 B
Nix
23 lines
504 B
Nix
{ pkgs, lib, stdenv, ... }:
|
|
|
|
lib.optionalAttrs stdenv.hostPlatform.isLinux (
|
|
pkgs.recurseIntoAttrs {
|
|
|
|
nixos-test = (pkgs.nixos {
|
|
boot.loader.grub.enable = false;
|
|
fileSystems."/".device = "/dev/null";
|
|
}).toplevel;
|
|
|
|
nixosTest-test = pkgs.nixosTest ({ lib, pkgs, ... }: {
|
|
name = "nixosTest-test";
|
|
machine = { pkgs, ... }: {
|
|
environment.systemPackages = [ pkgs.hello ];
|
|
};
|
|
testScript = ''
|
|
$machine->succeed("hello");
|
|
'';
|
|
});
|
|
|
|
}
|
|
)
|