tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
grass: add package tests
Ivan Mincik
2 years ago
79dffec1
dbb11d09
+25
-2
2 changed files
expand all
collapse all
unified
split
pkgs
applications
gis
grass
default.nix
tests.nix
+7
-2
pkgs/applications/gis/grass/default.nix
···
1
1
{ lib
2
2
, stdenv
3
3
+
, callPackage
3
4
, fetchFromGitHub
4
5
, makeWrapper
5
6
, wrapGAppsHook
···
31
32
, zstd
32
33
}:
33
34
34
34
-
stdenv.mkDerivation rec {
35
35
+
stdenv.mkDerivation (finalAttrs: rec {
35
36
pname = "grass";
36
37
version = "8.3.0";
37
38
···
140
141
141
142
enableParallelBuilding = true;
142
143
144
144
+
passthru.tests = {
145
145
+
grass = callPackage ./tests.nix { grass = finalAttrs.finalPackage; };
146
146
+
};
147
147
+
143
148
meta = with lib; {
144
149
description = "GIS software suite used for geospatial data management and analysis, image processing, graphics and maps production, spatial modeling, and visualization";
145
150
homepage = "https://grass.osgeo.org/";
···
147
152
maintainers = with maintainers; teams.geospatial.members ++ [ mpickering ];
148
153
platforms = platforms.all;
149
154
};
150
150
-
}
155
155
+
})
+18
pkgs/applications/gis/grass/tests.nix
···
1
1
+
{ runCommand, grass }:
2
2
+
3
3
+
let
4
4
+
inherit (grass) pname version;
5
5
+
6
6
+
in
7
7
+
runCommand "${pname}-tests" { meta.timeout = 60; }
8
8
+
''
9
9
+
HOME=$(mktemp -d)
10
10
+
11
11
+
${grass}/bin/grass --tmp-location EPSG:3857 --exec g.version \
12
12
+
| grep 'GRASS ${version}'
13
13
+
14
14
+
${grass}/bin/grass --tmp-location EPSG:3857 --exec g.mapset -l \
15
15
+
| grep 'PERMANENT'
16
16
+
17
17
+
touch $out
18
18
+
''