curl: add pkg-config metadata for libcurl.pc

I did not add the validatePkgConfig setup hook to curl, as I suspect it
may cause trouble when bootstrapping.
This commit is contained in:
sternenseemann 2023-02-15 13:51:06 +01:00
parent 1b7d196aa5
commit c5a0a5ac5e
3 changed files with 9 additions and 1 deletions

View file

@ -6,7 +6,7 @@ Nixpkgs provides a couple of facilities for working with this tool.
## Writing packages providing pkg-config modules
Packages should set `meta.pkgConfigProvides` with the list of package config modules they provide.
Packages should set `meta.pkgConfigModules` with the list of package config modules they provide.
They should also use `testers.testMetaPkgConfig` to check that the final built package matches that list.
Additionally, the [`validatePkgConfig` setup hook](https://nixos.org/manual/nixpkgs/stable/#validatepkgconfig), will do extra checks on to-be-installed pkg-config modules.

View file

@ -33,6 +33,7 @@
, phpExtensions
, python3
, tests
, testers
, fetchpatch
}:
@ -178,6 +179,7 @@ stdenv.mkDerivation (finalAttrs: {
# Additional checking with support http3 protocol.
# nginx-http3 = useThisCurl nixosTests.nginx-http3;
nginx-http3 = nixosTests.nginx-http3;
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
};
@ -189,5 +191,6 @@ stdenv.mkDerivation (finalAttrs: {
platforms = platforms.all;
# Fails to link against static brotli or gss
broken = stdenv.hostPlatform.isStatic && (brotliSupport || gssSupport);
pkgConfigModules = [ "libcurl" ];
};
})

View file

@ -445,6 +445,11 @@
"openssl"
]
},
"libcurl": {
"attrPath": [
"curl"
]
},
"libecpg": {
"attrPath": [
"postgresql"