expat: Add meta.pkgConfigModules

+9 -4
+9 -4
pkgs/development/libraries/expat/default.nix
··· 7 7 , haskellPackages 8 8 , luaPackages 9 9 , ocamlPackages 10 + , testers 10 11 }: 11 12 12 13 # Note: this package is used for bootstrapping fetchurl, and thus ··· 14 15 # cgit) that are needed here should be included directly in Nixpkgs as 15 16 # files. 16 17 17 - stdenv.mkDerivation rec { 18 + stdenv.mkDerivation (finalAttrs: { 18 19 pname = "expat"; 19 20 version = "2.5.0"; 20 21 21 22 src = fetchurl { 22 - url = "https://github.com/libexpat/libexpat/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${pname}-${version}.tar.xz"; 23 + url = with finalAttrs; "https://github.com/libexpat/libexpat/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${pname}-${version}.tar.xz"; 23 24 sha256 = "1gnwihpfz4x18rwd6cbrdggmfqjzwsdfh1gpmc0ph21c4gq2097g"; 24 25 }; 25 26 ··· 43 44 # CMake files incorrectly calculate library path from dev prefix 44 45 # https://github.com/libexpat/libexpat/issues/501 45 46 postFixup = '' 46 - substituteInPlace $dev/lib/cmake/expat-${version}/expat-noconfig.cmake \ 47 + substituteInPlace $dev/lib/cmake/expat-${finalAttrs.version}/expat-noconfig.cmake \ 47 48 --replace "$"'{_IMPORT_PREFIX}' $out 48 49 ''; 49 50 ··· 54 55 inherit (perlPackages) XMLSAXExpat XMLParser; 55 56 inherit (luaPackages) luaexpat; 56 57 inherit (ocamlPackages) ocaml_expat; 58 + pkg-config = testers.hasPkgConfigModules { 59 + package = finalAttrs.finalPackage; 60 + }; 57 61 }; 58 62 59 63 meta = with lib; { ··· 61 65 description = "A stream-oriented XML parser library written in C"; 62 66 platforms = platforms.all; 63 67 license = licenses.mit; # expat version 68 + pkgConfigModules = [ "expat" ]; 64 69 }; 65 - } 70 + })