From 6db1d3229c037810bd2a7f8b98ffc3d66d06e0e0 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 7 Feb 2023 09:25:27 -0500 Subject: [PATCH] cairo: Add `meta.pkgConfigModules` and test --- pkgs/development/libraries/cairo/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index c1e7b52c0403..ee8e436d2926 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -8,11 +8,14 @@ , libGL # libGLU libGL is no longer a big dependency , pdfSupport ? true , darwin +, testers }: let inherit (lib) optional optionals; -in stdenv.mkDerivation rec { +in stdenv.mkDerivation (finalAttrs: let + inherit (finalAttrs) pname version; +in { pname = "cairo"; version = "1.16.0"; @@ -132,6 +135,8 @@ in stdenv.mkDerivation rec { postInstall = lib.optionalString stdenv.isDarwin glib.flattenInclude; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "A 2D graphics library with support for multiple output devices"; longDescription = '' @@ -147,6 +152,11 @@ in stdenv.mkDerivation rec { ''; homepage = "http://cairographics.org/"; license = with licenses; [ lgpl2Plus mpl10 ]; + pkgConfigModules = [ + "cairo-ps" + "cairo-svg" + ] ++ lib.optional gobjectSupport "cairo-gobject" + ++ lib.optional pdfSupport "cairo-gobject"; platforms = platforms.all; }; -} +})