Skip to content

Commit 0b67937

Browse files
authored
fix(nix): stop the Linux source build failing on a rejected pipewire cflag (#1517)
1 parent 9a835e1 commit 0b67937

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

nix/package.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,14 @@ else
235235
apple-sdk_15
236236
];
237237

238+
# pipewire's libspa-0.2.pc carries `-fno-strict-overflow` in its Cflags, and
239+
# libpipewire-0.3 pulls it in via Requires. cgo refuses any pkg-config flag
240+
# outside its allowlist, and that one is not on it, so the linux adapter
241+
# fails to build until cgo is told the flag is safe.
242+
env = lib.optionalAttrs stdenv.hostPlatform.isLinux {
243+
CGO_CFLAGS_ALLOW = "-fno-strict-overflow";
244+
};
245+
238246
# Allow Go to use any available toolchain
239247
preBuild = ''
240248
export GOTOOLCHAIN=auto

0 commit comments

Comments
 (0)