writers: fix writeC libraries detection

This commit is contained in:
lassulus 2019-10-21 23:18:42 +02:00
parent f4725b30ff
commit a5d874935e

View File

@ -92,13 +92,15 @@ rec {
PATH=${makeBinPath [
pkgs.binutils-unwrapped
pkgs.coreutils
pkgs.findutils
pkgs.gcc
pkgs.pkgconfig
]}
export PKG_CONFIG_PATH=${concatMapStringsSep ":" (pkg: "${pkg}/lib/pkgconfig") libraries}
gcc \
${optionalString (libraries != [])
"$(pkg-config --cflags --libs ${
concatMapStringsSep " " (pkg: "$(find ${escapeShellArg pkg}/lib/pkgsconfig -name \*.pc -exec basename {} \;)") libraries
concatMapStringsSep " " (pkg: "$(find ${escapeShellArg pkg}/lib/pkgconfig -name \\*.pc)") libraries
})"
} \
-O \