From 5649b4b8293de5bcbbe5934580c2eb7c1c388556 Mon Sep 17 00:00:00 2001 From: Eldritch Cookie Date: Fri, 12 Jan 2024 13:52:30 -0300 Subject: [PATCH] isocodes: add pkgConfigModules metadata and corresponding test --- pkgs/development/libraries/iso-codes/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/iso-codes/default.nix b/pkgs/development/libraries/iso-codes/default.nix index 5539a97f0ce6..0b9b316f4433 100644 --- a/pkgs/development/libraries/iso-codes/default.nix +++ b/pkgs/development/libraries/iso-codes/default.nix @@ -1,11 +1,11 @@ -{ lib, stdenv, fetchurl, gettext, python3 }: +{ lib, stdenv, fetchurl, gettext, python3, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "iso-codes"; version = "4.16.0"; src = fetchurl { - url = "https://salsa.debian.org/iso-codes-team/iso-codes/-/archive/v${version}/${pname}-v${version}.tar.gz"; + url = with finalAttrs; "https://salsa.debian.org/iso-codes-team/iso-codes/-/archive/v${version}/${pname}-v${version}.tar.gz"; sha256 = "sha256-fJkPw5oFl1vtsBdeP/Cfw4MEiBX2i0Yqu/BVqAMuZsw="; }; @@ -13,10 +13,17 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru.tests = { + pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + }; + }; + meta = with lib; { homepage = "https://salsa.debian.org/iso-codes-team/iso-codes"; description = "Various ISO codes packaged as XML files"; license = licenses.lgpl21; platforms = platforms.all; + pkgConfigModules = [ "iso-codes" ]; }; -} +})