diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-01-30 09:48:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 09:48:53 +0100 |
commit | 663c41affd45f58c45363fbb440705cadc258ff4 (patch) | |
tree | 8b17d44e2aa89ff2369dd667a9499be7ff918a4a /doc | |
parent | 28065fed29d92117b9e2a366412d2fc4aac887b1 (diff) | |
parent | d8a217801e21d561e47a91ea60ec086397fc7466 (diff) |
Merge pull request #212282 from hercules-ci/pkg-config-packages
defaultPkgConfigPackages: init
Diffstat (limited to 'doc')
-rw-r--r-- | doc/builders/testers.chapter.md | 13 | ||||
-rw-r--r-- | doc/languages-frameworks/index.xml | 1 | ||||
-rw-r--r-- | doc/languages-frameworks/pkg-config.section.md | 9 |
3 files changed, 23 insertions, 0 deletions
diff --git a/doc/builders/testers.chapter.md b/doc/builders/testers.chapter.md index 3d91f096051ee..a0f0f97f9d53f 100644 --- a/doc/builders/testers.chapter.md +++ b/doc/builders/testers.chapter.md @@ -1,6 +1,19 @@ # Testers {#chap-testers} This chapter describes several testing builders which are available in the <literal>testers</literal> namespace. +## `hasPkgConfigModule` {#tester-hasPkgConfigModule} + +Checks whether a package exposes a certain `pkg-config` module. + +Example: + +```nix +passthru.tests.pkg-config = testers.hasPkgConfigModule { + package = finalAttrs.finalPackage; + moduleName = "libfoo"; +} +``` + ## `testVersion` {#tester-testVersion} Checks the command output contains the specified version diff --git a/doc/languages-frameworks/index.xml b/doc/languages-frameworks/index.xml index 7d404643d3693..3774924c0be4a 100644 --- a/doc/languages-frameworks/index.xml +++ b/doc/languages-frameworks/index.xml @@ -32,6 +32,7 @@ <xi:include href="octave.section.xml" /> <xi:include href="perl.section.xml" /> <xi:include href="php.section.xml" /> + <xi:include href="pkg-config.section.xml" /> <xi:include href="python.section.xml" /> <xi:include href="qt.section.xml" /> <xi:include href="r.section.xml" /> diff --git a/doc/languages-frameworks/pkg-config.section.md b/doc/languages-frameworks/pkg-config.section.md new file mode 100644 index 0000000000000..ee0a471be3e57 --- /dev/null +++ b/doc/languages-frameworks/pkg-config.section.md @@ -0,0 +1,9 @@ +# pkg-config {#sec-pkg-config} + +*pkg-config* is a unified interface for declaring and querying built C/C++ libraries. + +Nixpkgs provides a couple of facilities for working with this tool. + + - A [setup hook](#setup-hook-pkg-config) bundled with in the `pkg-config` package, to bring a derivation's declared build inputs into the environment. + - The [`validatePkgConfig` setup hook](https://nixos.org/manual/nixpkgs/stable/#validatepkgconfig), for packages that provide pkg-config modules. + - The `defaultPkgConfigPackages` package set: a set of aliases, named after the modules they provide. This is meant to be used by language-to-nix integrations. Hand-written packages should use the normal Nixpkgs attribute name instead. |