diff options
author | sternenseemann <sternenseemann@systemli.org> | 2023-08-08 12:51:22 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2023-08-08 19:16:48 +0200 |
commit | af60e68744fc34d61766d1bf0b58fc0cc6aa11de (patch) | |
tree | bb2ae50ee2565ba898e2702f4de305057bceff3e /pkgs/build-support/testers/default.nix | |
parent | f1dc41a5cd467b19b7699b9fbd9d18286c891ff6 (diff) | |
download | nixpkgs-af60e68744fc34d61766d1bf0b58fc0cc6aa11de.tar nixpkgs-af60e68744fc34d61766d1bf0b58fc0cc6aa11de.tar.gz nixpkgs-af60e68744fc34d61766d1bf0b58fc0cc6aa11de.tar.bz2 nixpkgs-af60e68744fc34d61766d1bf0b58fc0cc6aa11de.tar.lz nixpkgs-af60e68744fc34d61766d1bf0b58fc0cc6aa11de.tar.xz nixpkgs-af60e68744fc34d61766d1bf0b58fc0cc6aa11de.tar.zst nixpkgs-af60e68744fc34d61766d1bf0b58fc0cc6aa11de.zip |
testers.hasPkgConfigModules: allow checking multiple pkg-config mods
This is very useful in conjunction with meta.pkgConfigModules, as the new tester can use the list provided by this meta attribute as a default value for moduleNames, making its usage in passthru.tests very convenient. For backwards compatibility, a shim under the old name is maintained with a warning.
Diffstat (limited to 'pkgs/build-support/testers/default.nix')
-rw-r--r-- | pkgs/build-support/testers/default.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/build-support/testers/default.nix b/pkgs/build-support/testers/default.nix index d380dc6f30e..3ff52ed0178 100644 --- a/pkgs/build-support/testers/default.nix +++ b/pkgs/build-support/testers/default.nix @@ -1,4 +1,4 @@ -{ pkgs, buildPackages, lib, callPackage, runCommand, stdenv, substituteAll, }: +{ pkgs, buildPackages, lib, callPackage, runCommand, stdenv, substituteAll, testers }: # Documentation is in doc/builders/testers.chapter.md { # See https://nixos.org/manual/nixpkgs/unstable/#tester-testBuildFailure @@ -137,7 +137,14 @@ in nixosTesting.simpleTest calledTest; - hasPkgConfigModule = callPackage ./hasPkgConfigModule/tester.nix { }; + hasPkgConfigModule = + { moduleName, ... }@args: + lib.warn "testers.hasPkgConfigModule has been deprecated in favor of testers.hasPkgConfigModules. It accepts a list of strings via the moduleNames argument instead of a single moduleName." ( + testers.hasPkgConfigModules (builtins.removeAttrs args [ "moduleName" ] // { + moduleNames = [ moduleName ]; + }) + ); + hasPkgConfigModules = callPackage ./hasPkgConfigModules/tester.nix { }; testMetaPkgConfig = callPackage ./testMetaPkgConfig/tester.nix { }; } |