testers.hasPkgConfigModules: use PKG_CONFIG envvar instead of hardcoding

fixes cross compilation
This commit is contained in:
Nick Cao 2024-01-28 20:33:42 -05:00 committed by sternenseemann
parent 6c9f27ab9a
commit 1b391ffbd5

View File

@ -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