From d0e7867130f192a17c63d93ee47dc1e5d077d781 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 12 Feb 2023 15:14:14 -0500 Subject: [PATCH] openssl: Add `meta.pkgConfigModules` and test --- pkgs/development/libraries/openssl/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 488613fd489a..75ffe5ae06a6 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -10,6 +10,7 @@ # path to openssl.cnf file. will be placed in $etc/etc/ssl/openssl.cnf to replace the default , conf ? null , removeReferencesTo +, testers }: # Note: this package is used for bootstrapping fetchurl, and thus @@ -19,12 +20,12 @@ let common = { version, sha256, patches ? [], withDocs ? false, extraMeta ? {} }: - stdenv.mkDerivation rec { + stdenv.mkDerivation (finalAttrs: { pname = "openssl"; inherit version; src = fetchurl { - url = "https://www.openssl.org/source/${pname}-${version}.tar.gz"; + url = "https://www.openssl.org/source/${finalAttrs.pname}-${version}.tar.gz"; inherit sha256; }; @@ -204,13 +205,20 @@ let fi ''; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { homepage = "https://www.openssl.org/"; description = "A cryptographic library that implements the SSL and TLS protocols"; license = licenses.openssl; + pkgConfigModules = [ + "libcrypto" + "libssl" + "openssl" + ]; platforms = platforms.all; } // extraMeta; - }; + }); in {