grass: add package tests
This commit is contained in:
parent
dbb11d0990
commit
79dffec139
2 changed files with 25 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, callPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
, zstd
|
, zstd
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: rec {
|
||||||
pname = "grass";
|
pname = "grass";
|
||||||
version = "8.3.0";
|
version = "8.3.0";
|
||||||
|
|
||||||
|
@ -140,6 +141,10 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
grass = callPackage ./tests.nix { grass = finalAttrs.finalPackage; };
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "GIS software suite used for geospatial data management and analysis, image processing, graphics and maps production, spatial modeling, and visualization";
|
description = "GIS software suite used for geospatial data management and analysis, image processing, graphics and maps production, spatial modeling, and visualization";
|
||||||
homepage = "https://grass.osgeo.org/";
|
homepage = "https://grass.osgeo.org/";
|
||||||
|
@ -147,4 +152,4 @@ stdenv.mkDerivation rec {
|
||||||
maintainers = with maintainers; teams.geospatial.members ++ [ mpickering ];
|
maintainers = with maintainers; teams.geospatial.members ++ [ mpickering ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
18
pkgs/applications/gis/grass/tests.nix
Normal file
18
pkgs/applications/gis/grass/tests.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ runCommand, grass }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (grass) pname version;
|
||||||
|
|
||||||
|
in
|
||||||
|
runCommand "${pname}-tests" { meta.timeout = 60; }
|
||||||
|
''
|
||||||
|
HOME=$(mktemp -d)
|
||||||
|
|
||||||
|
${grass}/bin/grass --tmp-location EPSG:3857 --exec g.version \
|
||||||
|
| grep 'GRASS ${version}'
|
||||||
|
|
||||||
|
${grass}/bin/grass --tmp-location EPSG:3857 --exec g.mapset -l \
|
||||||
|
| grep 'PERMANENT'
|
||||||
|
|
||||||
|
touch $out
|
||||||
|
''
|
Loading…
Reference in a new issue