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
{ lib
2
, stdenv
0
3
, fetchFromGitHub
4
, makeWrapper
5
, wrapGAppsHook
···
31
, zstd
32
}:
33
34
-
stdenv.mkDerivation rec {
35
pname = "grass";
36
version = "8.3.0";
37
···
140
141
enableParallelBuilding = true;
142
0
0
0
0
143
meta = with lib; {
144
description = "GIS software suite used for geospatial data management and analysis, image processing, graphics and maps production, spatial modeling, and visualization";
145
homepage = "https://grass.osgeo.org/";
···
147
maintainers = with maintainers; teams.geospatial.members ++ [ mpickering ];
148
platforms = platforms.all;
149
};
150
-
}
···
1
{ lib
2
, stdenv
3
+
, callPackage
4
, fetchFromGitHub
5
, makeWrapper
6
, wrapGAppsHook
···
32
, zstd
33
}:
34
35
+
stdenv.mkDerivation (finalAttrs: rec {
36
pname = "grass";
37
version = "8.3.0";
38
···
141
142
enableParallelBuilding = true;
143
144
+
passthru.tests = {
145
+
grass = callPackage ./tests.nix { grass = finalAttrs.finalPackage; };
146
+
};
147
+
148
meta = with lib; {
149
description = "GIS software suite used for geospatial data management and analysis, image processing, graphics and maps production, spatial modeling, and visualization";
150
homepage = "https://grass.osgeo.org/";
···
152
maintainers = with maintainers; teams.geospatial.members ++ [ mpickering ];
153
platforms = platforms.all;
154
};
155
+
})
+18
pkgs/applications/gis/grass/tests.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ runCommand, grass }:
2
+
3
+
let
4
+
inherit (grass) pname version;
5
+
6
+
in
7
+
runCommand "${pname}-tests" { meta.timeout = 60; }
8
+
''
9
+
HOME=$(mktemp -d)
10
+
11
+
${grass}/bin/grass --tmp-location EPSG:3857 --exec g.version \
12
+
| grep 'GRASS ${version}'
13
+
14
+
${grass}/bin/grass --tmp-location EPSG:3857 --exec g.mapset -l \
15
+
| grep 'PERMANENT'
16
+
17
+
touch $out
18
+
''