From bda5a3e229d97f0a0c12d8614edb080cceae2950 Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Mon, 16 Oct 2023 00:28:24 -0400 Subject: [PATCH] libidn: Add `meta.pkgConfigModules` and test --- pkgs/development/libraries/libidn/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libidn/default.nix b/pkgs/development/libraries/libidn/default.nix index 83f69cfaa02b..9e1d9e55c16a 100644 --- a/pkgs/development/libraries/libidn/default.nix +++ b/pkgs/development/libraries/libidn/default.nix @@ -1,11 +1,13 @@ -{ fetchurl, lib, stdenv, libiconv }: +{ fetchurl, lib, stdenv, libiconv +, testers +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libidn"; version = "1.41"; src = fetchurl { - url = "mirror://gnu/libidn/${pname}-${version}.tar.gz"; + url = "mirror://gnu/libidn/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; sha256 = "sha256-iE1wY2S4Gr3Re+6Whtj/KudDHFoUZRBHxorfizH9iUU="; }; @@ -15,6 +17,8 @@ stdenv.mkDerivation rec { buildInputs = lib.optional stdenv.isDarwin libiconv; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = { homepage = "https://www.gnu.org/software/libidn/"; description = "Library for internationalized domain names"; @@ -36,7 +40,8 @@ stdenv.mkDerivation rec { ''; license = lib.licenses.lgpl2Plus; + pkgConfigModules = [ "libidn" ]; platforms = lib.platforms.all; maintainers = with lib.maintainers; [ lsix ]; }; -} +})