about summary refs log tree commit diff
path: root/nixos/tests/qgis.nix
blob: 7706b8c0774718ec027bc0203a2c13b3216b80af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import ./make-test-python.nix ({ pkgs, lib, qgisPackage, ... }:
  let
    testScript = pkgs.writeTextFile {
      name = "qgis-test.py";
      text = (builtins.readFile ../../pkgs/applications/gis/qgis/test.py);
    };
  in
  {
    name = "qgis";
    meta = {
      maintainers = with lib; [ teams.geospatial.members ];
    };

    nodes = {
      machine = { pkgs, ... }: {
        virtualisation.diskSize = 2 * 1024;

        imports = [ ./common/x11.nix ];
        environment.systemPackages = [ qgisPackage ];

      };
    };

    testScript = ''
      start_all()

      machine.succeed("${qgisPackage}/bin/qgis --version | grep 'QGIS ${qgisPackage.version}'")
      machine.succeed("${qgisPackage}/bin/qgis --code ${testScript}")
    '';
  })