geos: add package tests
This commit is contained in:
parent
e21717896d
commit
b703fb0361
|
@ -1,8 +1,10 @@
|
|||
{ lib
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, stdenv
|
||||
, callPackage
|
||||
, fetchpatch
|
||||
, fetchurl
|
||||
, testers
|
||||
|
||||
, cmake
|
||||
}:
|
||||
|
||||
|
@ -29,7 +31,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
doCheck = true;
|
||||
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
passthru.tests = {
|
||||
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
|
||||
geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software";
|
||||
|
|
15
pkgs/development/libraries/geos/tests.nix
Normal file
15
pkgs/development/libraries/geos/tests.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ runCommand, geos }:
|
||||
|
||||
let
|
||||
inherit (geos) pname;
|
||||
in
|
||||
runCommand "${geos}-tests" { meta.timeout = 60; }
|
||||
''
|
||||
${geos}/bin/geosop \
|
||||
--explode \
|
||||
--format wkt \
|
||||
polygonize \
|
||||
-a "MULTILINESTRING ((200 100, 100 100, 200 200), (200 200, 200 100), (200 200, 300 100, 200 100))" \
|
||||
| grep 'POLYGON ((200 100, 100 100, 200 200, 200 100))'
|
||||
touch $out
|
||||
''
|
Loading…
Reference in a new issue