summaryrefslogtreecommitdiffstats
path: root/nixos/tests/lix.nix
blob: 7d3317528bda922ef097f82c630298aaf491a389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ ... }: {
  name = "lix";

  nodes.machine = { pkgs, ... }: {
    nix.enable = true; # disabled by default. See all-tests.nix / tag(no-nix-by-default)

    nix.package = pkgs.lix;

    environment.etc."test.nix".text = ''
      derivation {
        name = "test";
        builder = "/bin/sh";
        args = [ "-c" "echo succeeded > $out" ];
        system = "${pkgs.stdenv.hostPlatform.system}";
      }
    '';
  };
  testScript = ''
    start_all()
    machine.wait_for_unit("sockets.target")
    machine.succeed("NIX_REMOTE=daemon nix-build /etc/test.nix")
  '';
}