diff --git a/pkgs/build-support/setup-hooks/multiple-outputs.sh b/pkgs/build-support/setup-hooks/multiple-outputs.sh index a73c1f059a26..3ab77683a41d 100644 --- a/pkgs/build-support/setup-hooks/multiple-outputs.sh +++ b/pkgs/build-support/setup-hooks/multiple-outputs.sh @@ -112,6 +112,11 @@ _multioutDevs() { _moveToOutput include "${!outputInclude}" _moveToOutput lib/pkgconfig "${!outputDev}" _moveToOutput "lib/*.la" "${!outputDev}" + + echo "Patching *.pc includedir to output ${!outputInclude}" + for f in "${!outputDev}"/lib/pkgconfig/*.pc; do + sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f" + done } # Make ${!outputDev} propagate other outputs needed for development