mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
libxml2: add meta.pkgConfigModules and tests.pkg-config
Co-authored-by: Rodney Lorrimar <dev@rodney.id.au>
This commit is contained in:
parent
511914a5fe
commit
bee5bd0106
@ -20,6 +20,7 @@
|
||||
, enableShared ? !stdenv.hostPlatform.isMinGW && !stdenv.hostPlatform.isStatic
|
||||
, enableStatic ? !enableShared
|
||||
, gnome
|
||||
, testers
|
||||
}:
|
||||
|
||||
let
|
||||
@ -32,7 +33,7 @@ in
|
||||
assert oldVer -> stdenv.isDarwin; # reduce likelihood of using old libxml2 unintentionally
|
||||
|
||||
let
|
||||
libxml = stdenv.mkDerivation rec {
|
||||
libxml = stdenv.mkDerivation (finalAttrs: rec {
|
||||
pname = "libxml2";
|
||||
version = "2.12.4";
|
||||
|
||||
@ -123,6 +124,11 @@ libxml = stdenv.mkDerivation rec {
|
||||
packageName = pname;
|
||||
versionPolicy = "none";
|
||||
};
|
||||
tests = {
|
||||
pkg-config = testers.hasPkgConfigModules {
|
||||
package = finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
@ -131,8 +137,9 @@ libxml = stdenv.mkDerivation rec {
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ eelco jtojnar ];
|
||||
pkgConfigModules = [ "libxml-2.0" ];
|
||||
};
|
||||
};
|
||||
});
|
||||
in
|
||||
if oldVer then
|
||||
libxml.overrideAttrs (attrs: rec {
|
||||
|
@ -23639,8 +23639,8 @@ with pkgs;
|
||||
in pkgs.buildEnv { # slightly hacky
|
||||
name = "libxml2+py-${res.libxml2.version}";
|
||||
paths = with libxml2; [ dev bin py ];
|
||||
# Avoid update.nix conflicts with libxml2.
|
||||
passthru = builtins.removeAttrs libxml2.passthru [ "updateScript" ];
|
||||
# Avoid update.nix/tests conflicts with libxml2.
|
||||
passthru = builtins.removeAttrs libxml2.passthru [ "updateScript" "tests" ];
|
||||
# the hook to find catalogs is hidden by buildEnv
|
||||
postBuild = ''
|
||||
mkdir "$out/nix-support"
|
||||
|
Loading…
Reference in New Issue
Block a user