Merge pull request #215056 from obsidiansystems/more-meta-pkg-config-modules

treewide: Add `meta.pkgConfigModules` to a few packages
This commit is contained in:
John Ericson 2023-02-07 16:58:10 -05:00 committed by GitHub
commit 96b00e5685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 142 additions and 47 deletions

View File

@ -21,6 +21,7 @@
, libde265Support ? true, libde265
, fftw
, ApplicationServices, Foundation
, testers
}:
let
@ -33,14 +34,14 @@ let
else null;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "imagemagick";
version = "6.9.12-68";
src = fetchFromGitHub {
owner = "ImageMagick";
repo = "ImageMagick6";
rev = version;
rev = finalAttrs.version;
sha256 = "sha256-slQcA0cblxtG/1DiJx5swUh7Kfwgz5HG70eqJFLaQJI=";
};
@ -109,10 +110,13 @@ stdenv.mkDerivation rec {
done
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
homepage = "https://legacy.imagemagick.org/";
changelog = "https://legacy.imagemagick.org/script/changelog.php";
description = "A software suite to create, edit, compose, or convert bitmap images";
pkgConfigModules = [ "ImageMagick" "MagickWand" ];
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ ];
license = licenses.asl20;
@ -137,4 +141,4 @@ stdenv.mkDerivation rec {
"CVE-2022-2719"
];
};
}
})

View File

@ -45,14 +45,14 @@ let
else null;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "imagemagick";
version = "7.1.0-61";
src = fetchFromGitHub {
owner = "ImageMagick";
repo = "ImageMagick";
rev = version;
rev = finalAttrs.version;
hash = "sha256-g7WeqPpPd1gceU+s+vRDpb41IX1lzpiqh3cAYeFdUlg=";
};
@ -126,14 +126,16 @@ stdenv.mkDerivation rec {
passthru.tests = {
version = testers.testVersion { package = imagemagick; };
inherit (python3.pkgs) img2pdf;
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = with lib; {
homepage = "http://www.imagemagick.org/";
description = "A software suite to create, edit, compose, or convert bitmap images";
pkgConfigModules = [ "ImageMagick" "MagickWand" ];
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ erictapen dotlambda ];
license = licenses.asl20;
mainProgram = "magick";
};
}
})

View File

@ -5,7 +5,8 @@
, python ? null
, ncurses, swig2
, extraPackages ? []
} :
, testers
}:
let
@ -14,7 +15,7 @@ let
modulesPath = "lib/SoapySDR/modules" + modulesVersion;
extraPackagesSearchPath = lib.makeSearchPath modulesPath extraPackages;
in stdenv.mkDerivation {
in stdenv.mkDerivation (finalAttrs: {
pname = "soapysdr";
inherit version;
@ -58,12 +59,15 @@ in stdenv.mkDerivation {
done
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
homepage = "https://github.com/pothosware/SoapySDR";
description = "Vendor and platform neutral SDR support library";
license = licenses.boost;
maintainers = with maintainers; [ markuskowa ];
mainProgram = "SoapySDRUtil";
pkgConfigModules = [ "SoapySDR" ];
platforms = platforms.unix;
};
}
})

View File

@ -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;
};
}
})

View File

@ -12,18 +12,19 @@
, enableMpi ? false
, mpi
, withDoc ? stdenv.cc.isGNU
, testers
}:
assert lib.elem precision [ "single" "double" "long-double" "quad-precision" ];
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "fftw-${precision}";
version = "3.3.10";
src = fetchurl {
urls = [
"https://fftw.org/fftw-${version}.tar.gz"
"ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"
"https://fftw.org/fftw-${finalAttrs.version}.tar.gz"
"ftp://ftp.fftw.org/pub/fftw/fftw-${finalAttrs.version}.tar.gz"
];
sha256 = "sha256-VskyVJhSzdz6/as4ILAgDHdCZ1vpIXnlnmIVs0DiZGc=";
};
@ -60,11 +61,21 @@ stdenv.mkDerivation rec {
nativeCheckInputs = [ perl ];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Fastest Fourier Transform in the West library";
homepage = "http://www.fftw.org/";
license = licenses.gpl2Plus;
maintainers = [ maintainers.spwhitt ];
pkgConfigModules = [
{
"single" = "fftw3f";
"double" = "fftw3";
"long-double" = "fftw3l";
"quad-precision" = "fftw3q";
}.${precision}
];
platforms = platforms.unix;
};
}
})

View File

@ -1,5 +1,3 @@
# TODO: Resolve the issues with the Mono bindings.
{ stdenv, fetchgit, lib
, pkg-config, autoreconfHook
, glib, dbus-glib
@ -7,11 +5,16 @@
, gtk2, libindicator-gtk2, libdbusmenu-gtk2
, gtk3, libindicator-gtk3, libdbusmenu-gtk3
, gtk-doc, vala, gobject-introspection
, monoSupport ? false, mono, gtk-sharp-2_0
}:
, monoSupport ? false, mono, gtk-sharp-2_0, gtk-sharp-3_0
, testers
}:
stdenv.mkDerivation {
pname = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}";
let
throwBadGtkVersion = throw "unknown GTK version ${gtkVersion}";
in
stdenv.mkDerivation (finalAttrs: {
pname = let postfix = if monoSupport then "sharp" else "gtk${gtkVersion}";
in "libappindicator-${postfix}";
version = "12.10.1+20.10.20200706.1";
@ -25,16 +28,24 @@ stdenv.mkDerivation {
nativeBuildInputs = [ pkg-config autoreconfHook vala gobject-introspection gtk-doc ];
propagatedBuildInputs =
if gtkVersion == "2"
then [ gtk2 libdbusmenu-gtk2 ]
else [ gtk3 libdbusmenu-gtk3 ];
propagatedBuildInputs = {
"2" = [ gtk2 libdbusmenu-gtk2 ];
"3" = [ gtk3 libdbusmenu-gtk3 ];
}.${gtkVersion} or throwBadGtkVersion;
buildInputs = [
glib dbus-glib
] ++ (if gtkVersion == "2"
then [ libindicator-gtk2 ] ++ lib.optionals monoSupport [ mono gtk-sharp-2_0 ]
else [ libindicator-gtk3 ]);
{
"2" = libindicator-gtk2;
"3" = libindicator-gtk3;
}.${gtkVersion} or throwBadGtkVersion
] ++ lib.optionals monoSupport [
mono
{
"2" = gtk-sharp-2_0;
"3" = gtk-sharp-3_0;
}.${gtkVersion} or throwBadGtkVersion
];
preAutoreconf = ''
gtkdocize
@ -54,11 +65,19 @@ stdenv.mkDerivation {
"localstatedir=\${TMPDIR}"
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "A library to allow applications to export a menu into the Unity Menu bar";
homepage = "https://launchpad.net/libappindicator";
license = with licenses; [ lgpl21 lgpl3 ];
pkgConfigModules = {
"2" = [ "appindicator-0.1" ];
"3" = [ "appindicator3-0.1" ];
}.${gtkVersion} or throwBadGtkVersion;
platforms = platforms.linux;
maintainers = [ maintainers.msteen ];
# TODO: Resolve the issues with the Mono bindings.
broken = monoSupport;
};
}
})

View File

@ -3,13 +3,16 @@
, glib, dbus-glib, json-glib
, gobject-introspection, vala
, gtkVersion ? null, gtk2, gtk3
, testers
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libdbusmenu-${if gtkVersion == null then "glib" else "gtk${gtkVersion}"}";
version = "16.04.0";
src = fetchurl {
src = let
inherit (finalAttrs) version;
in fetchurl {
url = "https://launchpad.net/dbusmenu/${lib.versions.majorMinor version}/${version}/+download/libdbusmenu-${version}.tar.gz";
sha256 = "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r";
};
@ -18,7 +21,11 @@ stdenv.mkDerivation rec {
buildInputs = [
glib dbus-glib json-glib
] ++ lib.optional (gtkVersion != null) (if gtkVersion == "2" then gtk2 else gtk3);
] ++ lib.optional (gtkVersion != null)
{
"2" = gtk2;
"3" = gtk3;
}.${gtkVersion} or (throw "unknown GTK version ${gtkVersion}");
postPatch = ''
for f in {configure,ltmain.sh,m4/libtool.m4}; do
@ -37,6 +44,7 @@ stdenv.mkDerivation rec {
"CFLAGS=-Wno-error"
"--sysconfdir=/etc"
"--localstatedir=/var"
# TODO use `lib.withFeatureAs`
(if gtkVersion == null then "--disable-gtk" else "--with-gtk=${gtkVersion}")
"--disable-scrollkeeper"
] ++ lib.optional (gtkVersion != "2") "--disable-dumper";
@ -49,11 +57,17 @@ stdenv.mkDerivation rec {
"typelibdir=${placeholder "out"}/lib/girepository-1.0"
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Library for passing menu structures across DBus";
homepage = "https://launchpad.net/dbusmenu";
license = with licenses; [ gpl3 lgpl21 lgpl3 ];
pkgConfigModules = [
"dbusmenu-glib-0.4"
"dbusmenu-jsonloader-0.4"
] ++ lib.optional (gtkVersion == "3") "dbusmenu-gtk${gtkVersion}-0.4";
platforms = platforms.linux;
maintainers = [ maintainers.msteen ];
};
}
})

View File

@ -13,16 +13,17 @@
, OpenGL
, runtimeShell
, withXorg ? true
, testers
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libdevil";
version = "1.7.8";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "mirror://sourceforge/openil/DevIL-${version}.tar.gz";
url = "mirror://sourceforge/openil/DevIL-${finalAttrs.version}.tar.gz";
sha256 = "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8";
};
@ -63,11 +64,14 @@ stdenv.mkDerivation rec {
done
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
homepage = "https://openil.sourceforge.net/";
description = "An image library which can can load, save, convert, manipulate, filter and display a wide variety of image formats";
license = licenses.lgpl2;
pkgConfigModules = [ "IL" ];
platforms = platforms.mesaPlatforms;
maintainers = with maintainers; [ ];
};
}
})

View File

@ -1,8 +1,10 @@
{ stdenv
, libglvnd, mesa
, OpenGL }:
, OpenGL
, testers
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
inherit (libglvnd) version;
pname = "libGL";
outputs = [ "out" "dev" ];
@ -72,4 +74,8 @@ stdenv.mkDerivation {
genPkgConfig glesv1_cm GLESv1_CM
genPkgConfig glesv2 GLESv2
'';
}
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta.pkgConfigModules = [ "gl" "egl" "glesv1_cm" "glesv2" ];
})

View File

@ -8,14 +8,15 @@
, withCxx ? !stdenv.hostPlatform.useAndroidPrebuilt
, mouseSupport ? false, gpm
, unicodeSupport ? true
, testers
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
version = "6.4";
pname = "ncurses" + lib.optionalString (abiVersion == "5") "-abi5-compat";
src = fetchurl {
url = "https://invisible-island.net/archives/ncurses/ncurses-${version}.tar.gz";
url = "https://invisible-island.net/archives/ncurses/ncurses-${finalAttrs.version}.tar.gz";
hash = "sha256-aTEoPZrIfFBz8wtikMTHXyFjK7T8NgOsgQCBK+0kgVk=";
};
@ -169,11 +170,20 @@ stdenv.mkDerivation rec {
ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp!
'';
license = licenses.mit;
pkgConfigModules = let
base = [
"form"
"menu"
"ncurses"
"panel"
] ++ lib.optional withCxx "ncurses++";
in base ++ lib.optionals unicodeSupport (map (p: p + "w") base);
platforms = platforms.all;
};
passthru = {
ldflags = "-lncurses";
inherit unicodeSupport abiVersion;
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
}
})

View File

@ -3,14 +3,15 @@
, fetchurl
, alsa-topology-conf
, alsa-ucm-conf
, testers
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "alsa-lib";
version = "1.2.7.2";
src = fetchurl {
url = "mirror://alsa/lib/${pname}-${version}.tar.bz2";
url = "mirror://alsa/lib/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
hash = "sha256-ijW3IY5Q8qLHk0LQ3pje2BQ5zhnhKAk4Xsm+lZbefC8=";
};
@ -31,6 +32,8 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
homepage = "http://www.alsa-project.org/";
description = "ALSA, the Advanced Linux Sound Architecture libraries";
@ -41,7 +44,8 @@ stdenv.mkDerivation rec {
'';
license = licenses.lgpl21Plus;
pkgConfigModules = [ "alsa" "alsa-topology" ];
platforms = platforms.linux;
maintainers = with maintainers; [ l-as ];
};
}
})

View File

@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl
, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
, autoreconfHook
, testers
}:
# Note: this package is used for bootstrapping fetchurl, and thus
@ -8,7 +9,9 @@
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: let
inherit (finalAttrs) version;
in {
pname = "bzip2";
version = "1.0.8";
@ -53,12 +56,15 @@ stdenv.mkDerivation rec {
ln -s $out/lib/libbz2.so.1.0.* $out/lib/libbz2.so.1.0
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "High-quality data compression program";
homepage = "https://www.sourceware.org/bzip2";
changelog = "https://sourceware.org/git/?p=bzip2.git;a=blob;f=CHANGES;hb=HEAD";
license = licenses.bsdOriginal;
pkgConfigModules = [ "bzip2" ];
platforms = platforms.all;
maintainers = with maintainers; [ mic92 ];
};
}
})

View File

@ -19593,6 +19593,7 @@ with pkgs;
fftwSinglePrec = fftw.override { precision = "single"; };
fftwFloat = fftwSinglePrec; # the configure option is just an alias
fftwLongDouble = fftw.override { precision = "long-double"; };
fftwQuad = fftw.override { precision = "quad-precision"; };
fftwMpi = fftw.override { enableMpi = true; };
filter-audio = callPackage ../development/libraries/filter-audio {};