1 cmakePcfileCheckPhase
() {
2 while IFS
= read -rd $
'\0' file; do
3 grepout
=$
(grep --line-number '}//nix/store' "$file" || true
)
4 if [ -n "$grepout" ]; then
6 echo "Broken paths found in a .pc file! $file"
7 echo "The following lines have issues (specifically '//' in paths)."
9 echo "It is very likely that paths are being joined improperly."
10 echo 'ex: "${prefix}/@CMAKE_INSTALL_LIBDIR@" should be "@CMAKE_INSTALL_FULL_LIBDIR@"'
11 echo "Please see https://github.com/NixOS/nixpkgs/issues/144170 for more details."
15 done < <(find "${!outputDev}" -iname "*.pc" -print0)
18 postFixupHooks
+=(cmakePcfileCheckPhase
)