testers.hasCmakeConfigModules: init (#410516)

This commit is contained in:
Nick Cao 2025-06-03 20:40:35 -04:00 committed by GitHub
commit abe0e73a27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 207 additions and 16 deletions

View file

@ -40,6 +40,26 @@ If the `moduleNames` argument is omitted, `hasPkgConfigModules` will use `meta.p
:::
## `hasCmakeConfigModules` {#tester-hasCmakeConfigModules}
Checks whether a package exposes a given list of `*config.cmake` modules.
Note the moduleNames used in cmake find_package are case sensitive.
:::{.example #ex-hascmakeconfigmodules}
# Check that `*config.cmake` modules are exposed using explicit module names
```nix
{
passthru.tests.cmake-config = testers.hasCmakeConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "Foo" ];
};
}
```
:::
## `lycheeLinkCheck` {#tester-lycheeLinkCheck}
Check a packaged static site's links with the [`lychee` package](https://search.nixos.org/packages?show=lychee&type=packages&query=lychee).

View file

@ -1703,6 +1703,12 @@
"ex-haspkgconfigmodules-explicitmodules": [
"index.html#ex-haspkgconfigmodules-explicitmodules"
],
"tester-hasCmakeConfigModules": [
"index.html#tester-hasCmakeConfigModules"
],
"ex-hascmakeconfigmodules": [
"index.html#ex-hascmakeconfigmodules"
],
"tester-lycheeLinkCheck": [
"index.html#tester-lycheeLinkCheck"
],