From 1b391ffbd548dc76d53859b62ec285ffc9e2b94e Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 28 Jan 2024 20:33:42 -0500 Subject: [PATCH] testers.hasPkgConfigModules: use PKG_CONFIG envvar instead of hardcoding fixes cross compilation --- pkgs/build-support/testers/hasPkgConfigModules/tester.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/testers/hasPkgConfigModules/tester.nix b/pkgs/build-support/testers/hasPkgConfigModules/tester.nix index 137739a1b48a..bbcc4f0c0f71 100644 --- a/pkgs/build-support/testers/hasPkgConfigModules/tester.nix +++ b/pkgs/build-support/testers/hasPkgConfigModules/tester.nix @@ -34,7 +34,7 @@ runCommand testName { for moduleName in $moduleNames; do echo "checking pkg-config module $moduleName in $buildInputs" set +e - version="$(pkg-config --modversion $moduleName)" + version="$($PKG_CONFIG --modversion $moduleName)" r=$? set -e if [[ $r = 0 ]]; then @@ -42,7 +42,7 @@ runCommand testName { printf '%s\t%s\n' "$moduleName" "$version" >> "$out" else echo "These modules were available in the input propagation closure:" - pkg-config --list-all + $PKG_CONFIG --list-all echo "❌ pkg-config module $moduleName was not found" false fi