-
Notifications
You must be signed in to change notification settings - Fork 1
/
checks.nix
55 lines (47 loc) · 1.31 KB
/
checks.nix
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ self', nixpkgs, pkgs }:
{
# package tests
inherit (self'.packages.gdal.tests)
ogrinfo-version
gdalinfo-version
ogrinfo-format-geopackage
gdalinfo-format-geotiff
vector-file
raster-file;
inherit (self'.packages.geos.tests) geos;
inherit (self'.packages.pdal.tests) pdal;
inherit (self'.packages.proj.tests) proj;
inherit (self'.packages.grass.tests) grass;
# tests
test-custom-package =
let
package = pkgs.gdal.overrideAttrs {
version = "1000.0.0";
postPatch = ''
sed -i "s|Usage:|Usage (patched):|" apps/argparse/argparse.hpp
'';
doInstallCheck = false;
};
in
pkgs.runCommand "test-script" { inherit package; } ''
"$package"/bin/gdalinfo --help | grep "Usage (patched): gdalinfo"
touch $out
'';
# nixos tests
test-qgis = pkgs.nixosTest (import ./tests/nixos/qgis.nix {
inherit nixpkgs pkgs;
lib = nixpkgs.lib;
qgisPackage = self'.packages.qgis;
});
test-qgis-ltr = pkgs.nixosTest (import ./tests/nixos/qgis.nix {
inherit nixpkgs pkgs;
lib = nixpkgs.lib;
qgisPackage = self'.packages.qgis-ltr;
});
test-nixgl = pkgs.nixosTest (import ./tests/nixos/nixgl.nix {
inherit nixpkgs pkgs;
lib = pkgs.lib;
nixGL = self'.packages.nixGL;
});
# TODO: add postgis test
}