From 5df263bdc01163b684cd2c5f8f2c99636d4bc3fd Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 11 Feb 2023 08:55:46 -0500 Subject: [PATCH] geos: Add `meta.pkgConfigModules` and test --- pkgs/development/libraries/geos/3.9.nix | 15 +++++++++++---- pkgs/development/libraries/geos/default.nix | 13 +++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/geos/3.9.nix b/pkgs/development/libraries/geos/3.9.nix index fd0531fa747f..415746d3e544 100644 --- a/pkgs/development/libraries/geos/3.9.nix +++ b/pkgs/development/libraries/geos/3.9.nix @@ -1,11 +1,15 @@ -{ lib, stdenv, fetchurl }: +{ lib +, stdenv +, fetchurl +, testers +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "geos"; version = "3.9.2"; src = fetchurl { - url = "https://download.osgeo.org/geos/${pname}-${version}.tar.bz2"; + url = "https://download.osgeo.org/geos/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2"; sha256 = "sha256-RKWpviHX1HNDa/Yhwt3MPPWou+PHhuEyKWGKO52GEpc="; }; @@ -14,12 +18,15 @@ stdenv.mkDerivation rec { # https://trac.osgeo.org/geos/ticket/993 configureFlags = lib.optional stdenv.isAarch32 "--disable-inline"; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "C++ port of the Java Topology Suite (JTS)"; homepage = "https://trac.osgeo.org/geos"; license = licenses.lgpl21Only; + pkgConfigModules = [ "geos" ]; maintainers = with lib.maintainers; [ willcohen ]; }; -} +}) diff --git a/pkgs/development/libraries/geos/default.nix b/pkgs/development/libraries/geos/default.nix index a331e0254568..670fa30cb0f1 100644 --- a/pkgs/development/libraries/geos/default.nix +++ b/pkgs/development/libraries/geos/default.nix @@ -2,14 +2,16 @@ , stdenv , fetchurl , fetchpatch -, cmake }: +, cmake +, testers +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "geos"; version = "3.11.1"; src = fetchurl { - url = "https://download.osgeo.org/geos/${pname}-${version}.tar.bz2"; + url = "https://download.osgeo.org/geos/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2"; hash = "sha256-bQ6zz6n5LZR3Mcx18XUDVrO9/AfqAgVT2vavHHaOC+I="; }; @@ -17,12 +19,15 @@ stdenv.mkDerivation rec { doCheck = true; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "C++ port of the Java Topology Suite (JTS)"; homepage = "https://trac.osgeo.org/geos"; license = licenses.lgpl21Only; + pkgConfigModules = [ "geos" ]; maintainers = with lib.maintainers; [ willcohen ]; }; -} +})