Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

geos: add package tests

+23 -3
+8 -3
pkgs/development/libraries/geos/default.nix
··· 1 1 { lib 2 - , fetchurl 3 - , fetchpatch 4 2 , stdenv 3 + , callPackage 4 + , fetchpatch 5 + , fetchurl 5 6 , testers 7 + 6 8 , cmake 7 9 }: 8 10 ··· 29 31 30 32 doCheck = true; 31 33 32 - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 34 + passthru.tests = { 35 + pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; }; 36 + geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; }; 37 + }; 33 38 34 39 meta = with lib; { 35 40 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
··· 1 + { runCommand, geos }: 2 + 3 + let 4 + inherit (geos) pname; 5 + in 6 + runCommand "${geos}-tests" { meta.timeout = 60; } 7 + '' 8 + ${geos}/bin/geosop \ 9 + --explode \ 10 + --format wkt \ 11 + polygonize \ 12 + -a "MULTILINESTRING ((200 100, 100 100, 200 200), (200 200, 200 100), (200 200, 300 100, 200 100))" \ 13 + | grep 'POLYGON ((200 100, 100 100, 200 200, 200 100))' 14 + touch $out 15 + ''