nixpkgs-suyu/pkgs/test/nixos-functions/default.nix
Robert Hensing 5d594d764e tests: Don't use pkgs.extend. OfBorg will reject it.
The good news is that it worked as expected.
2018-11-13 10:43:05 +01:00

22 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");
'';
});
}
)