lol

gdk-pixbuf: Add `meta.pkgConfigModules` and test

+10 -5
+10 -5
pkgs/development/libraries/gdk-pixbuf/default.nix
··· 19 19 , doCheck ? false 20 20 , makeWrapper 21 21 , lib 22 + , testers 22 23 }: 23 24 24 - stdenv.mkDerivation rec { 25 + stdenv.mkDerivation (finalAttrs: { 25 26 pname = "gdk-pixbuf"; 26 27 version = "2.42.10"; 27 28 28 29 outputs = [ "out" "dev" "man" "devdoc" ] 29 30 ++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests"; 30 31 31 - src = fetchurl { 32 + src = let 33 + inherit (finalAttrs) pname version; 34 + in fetchurl { 32 35 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 33 36 sha256 = "7ptsddE7oJaQei48aye2G80X9cfr6rWltDnS8uOf5Es="; 34 37 }; ··· 97 100 '' + lib.optionalString stdenv.isDarwin '' 98 101 # meson erroneously installs loaders with .dylib extension on Darwin. 99 102 # Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them. 100 - for f in $out/${passthru.moduleDir}/*.dylib; do 103 + for f in $out/${finalAttrs.passthru.moduleDir}/*.dylib; do 101 104 install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f 102 105 mv $f ''${f%.dylib}.so 103 106 done ··· 127 130 128 131 passthru = { 129 132 updateScript = gnome.updateScript { 130 - packageName = pname; 133 + packageName = finalAttrs.pname; 131 134 versionPolicy = "odd-unstable"; 132 135 }; 133 136 134 137 tests = { 135 138 installedTests = nixosTests.installed-tests.gdk-pixbuf; 139 + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 136 140 }; 137 141 138 142 # gdk_pixbuf_moduledir variable from gdk-pixbuf-2.0.pc ··· 145 149 license = licenses.lgpl21Plus; 146 150 maintainers = [ maintainers.eelco ] ++ teams.gnome.members; 147 151 mainProgram = "gdk-pixbuf-thumbnailer"; 152 + pkgConfigModules = [ "gdk-pixbuf-2.0" ]; 148 153 platforms = platforms.unix; 149 154 }; 150 - } 155 + })