2018-10-02 20:49:54 +01:00
|
|
|
{ pkgs, lib, stdenv, ... }:
|
|
|
|
|
|
|
|
lib.optionalAttrs stdenv.hostPlatform.isLinux (
|
|
|
|
pkgs.recurseIntoAttrs {
|
|
|
|
|
|
|
|
nixos-test = (pkgs.nixos {
|
|
|
|
boot.loader.grub.enable = false;
|
|
|
|
fileSystems."/".device = "/dev/null";
|
|
|
|
}).toplevel;
|
|
|
|
|
2018-10-23 16:32:59 +01:00
|
|
|
nixosTest-test = pkgs.nixosTest ({ lib, pkgs, ... }: {
|
|
|
|
name = "nixosTest-test";
|
2018-10-02 20:49:54 +01:00
|
|
|
machine = { pkgs, ... }: {
|
2018-10-23 16:32:59 +01:00
|
|
|
environment.systemPackages = [ pkgs.hello ];
|
2018-10-02 20:49:54 +01:00
|
|
|
};
|
|
|
|
testScript = ''
|
|
|
|
$machine->succeed("hello");
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
)
|