-
-
Save worldofpeace/297f48a0e156f9ce65d8e14cee125c96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix | |
index 4673b4e6cd8..5458d04ea90 100644 | |
--- a/pkgs/build-support/writers/default.nix | |
+++ b/pkgs/build-support/writers/default.nix | |
@@ -109,7 +109,7 @@ rec { | |
# return 0; | |
# } | |
# '' | |
- writeC = name: { libraries ? [] }: | |
+ writeC = name: { libraries ? [], headers ? [] }: | |
makeBinWriter { | |
compileScript = '' | |
PATH=${makeBinPath [ | |
@@ -125,6 +125,11 @@ rec { | |
"$(pkg-config --cflags --libs ${ | |
concatMapStringsSep " " (pkg: "$(find ${escapeShellArg pkg}/lib/pkgconfig -name \\*.pc)") libraries | |
})" | |
+ } \ | |
+ ${optionalString (headers != []) | |
+ "${ | |
+ concatMapStringSep " " (header: "-I${header}") headers | |
+ }" | |
} \ | |
-O \ | |
-o "$out" \ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment