libxml2: add meta.pkgConfigModules and tests.pkg-config

Co-authored-by: Rodney Lorrimar <dev@rodney.id.au>

authored by Eldritch Cookie Rodney Lorrimar and committed by Rodney Lorrimar bee5bd01 511914a5

+11 -4
+9 -2
pkgs/development/libraries/libxml2/default.nix
··· 20 20 , enableShared ? !stdenv.hostPlatform.isMinGW && !stdenv.hostPlatform.isStatic 21 21 , enableStatic ? !enableShared 22 22 , gnome 23 + , testers 23 24 }: 24 25 25 26 let ··· 32 33 assert oldVer -> stdenv.isDarwin; # reduce likelihood of using old libxml2 unintentionally 33 34 34 35 let 35 - libxml = stdenv.mkDerivation rec { 36 + libxml = stdenv.mkDerivation (finalAttrs: rec { 36 37 pname = "libxml2"; 37 38 version = "2.12.4"; 38 39 ··· 123 124 packageName = pname; 124 125 versionPolicy = "none"; 125 126 }; 127 + tests = { 128 + pkg-config = testers.hasPkgConfigModules { 129 + package = finalAttrs.finalPackage; 130 + }; 131 + }; 126 132 }; 127 133 128 134 meta = with lib; { ··· 131 137 license = licenses.mit; 132 138 platforms = platforms.all; 133 139 maintainers = with maintainers; [ eelco jtojnar ]; 140 + pkgConfigModules = [ "libxml-2.0" ]; 134 141 }; 135 - }; 142 + }); 136 143 in 137 144 if oldVer then 138 145 libxml.overrideAttrs (attrs: rec {
+2 -2
pkgs/top-level/all-packages.nix
··· 23639 23639 in pkgs.buildEnv { # slightly hacky 23640 23640 name = "libxml2+py-${res.libxml2.version}"; 23641 23641 paths = with libxml2; [ dev bin py ]; 23642 - # Avoid update.nix conflicts with libxml2. 23643 - passthru = builtins.removeAttrs libxml2.passthru [ "updateScript" ]; 23642 + # Avoid update.nix/tests conflicts with libxml2. 23643 + passthru = builtins.removeAttrs libxml2.passthru [ "updateScript" "tests" ]; 23644 23644 # the hook to find catalogs is hidden by buildEnv 23645 23645 postBuild = '' 23646 23646 mkdir "$out/nix-support"