expat: Add meta.pkgConfigModules

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