about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/geos
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-09-22 19:21:26 +0000
committerAlyssa Ross <hi@alyssa.is>2023-09-22 19:21:26 +0000
commitea2acbed493e218f696673a004a95829392c5e33 (patch)
treec5716552f205bbf4d4addfa4675ea5073786bd06 /nixpkgs/pkgs/development/libraries/geos
parent06ba6c84f858b011fb1132721e5d5e28fcda4a8a (diff)
parent8aa8cd68f4745eb92f003666bfd300f3e67cd9c1 (diff)
downloadnixlib-ea2acbed493e218f696673a004a95829392c5e33.tar
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.gz
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.bz2
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.lz
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.xz
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.zst
nixlib-ea2acbed493e218f696673a004a95829392c5e33.zip
Merge branch 'staging' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/geos')
-rw-r--r--nixpkgs/pkgs/development/libraries/geos/default.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/geos/tests.nix15
2 files changed, 23 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/geos/default.nix b/nixpkgs/pkgs/development/libraries/geos/default.nix
index 5c2369cf4410..1f3ce471dc0e 100644
--- a/nixpkgs/pkgs/development/libraries/geos/default.nix
+++ b/nixpkgs/pkgs/development/libraries/geos/default.nix
@@ -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";
diff --git a/nixpkgs/pkgs/development/libraries/geos/tests.nix b/nixpkgs/pkgs/development/libraries/geos/tests.nix
new file mode 100644
index 000000000000..0f11885ab78c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geos/tests.nix
@@ -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
+  ''