Merge pull request #205770 from imincik/proj-package-tests

proj: add package tests
This commit is contained in:
Robert Scott
2022-12-14 00:08:18 +00:00
committed by GitHub
2 changed files with 15 additions and 2 deletions
+4 -2
View File
@@ -5,6 +5,7 @@
, cmake
, pkg-config
, buildPackages
, callPackage
, sqlite
, libtiff
, curl
@@ -13,7 +14,7 @@
, python3
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: rec {
pname = "proj";
version = "9.1.1";
@@ -62,6 +63,7 @@ stdenv.mkDerivation rec {
passthru.tests = {
python = python3.pkgs.pyproj;
proj = callPackage ./tests.nix { proj = finalAttrs.finalPackage; };
};
meta = with lib; {
@@ -71,4 +73,4 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = with maintainers; [ dotlambda ];
};
}
})
+11
View File
@@ -0,0 +1,11 @@
{ runCommand, proj }:
let
inherit (proj) pname;
in
runCommand "${pname}-tests" { meta.timeout = 60; }
''
${proj}/bin/projinfo EPSG:4326 \
| grep '+proj=longlat +datum=WGS84 +no_defs +type=crs'
touch $out
''