From ea1d1a8f5283dd585149e61215cb40650304722c Mon Sep 17 00:00:00 2001 From: Atemu Date: Mon, 10 Jul 2023 13:23:05 +0200 Subject: [PATCH] bup: don't error out on implicit-function-declaration on darwin Upstream should fix that but this fixes the build on Darwin for now: ``` building build flags: SHELL=/nix/store/mxvgjwzdvrl81plvgqnzbrqb14ccnji6-bash-5.2-p15/bin/bash MANDIR=\$\(out\)/share/man DOCDIR=\$\(out\)/share/doc/bup BINDIR=\$\(out\)/bin LIBDIR=\$\(out\)/lib/bup fatal: not a git repository (or any of the parent directories): .git clang -I/nix/store/2rrfpkq6cr8ppip9szl0z1qfdlskdinq-python3-3.10.12/include/python3.10 -I/nix/store/2rrfpkq6cr8ppip9szl0z1qfdlskdinq-python3-3.10.12/include/python3.10 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/vnn3dp5cyjlknkqxmi29vbg812ml5m7r-libxcrypt-4.4.35/include -Wno-unused-command-line-argument -D_FILE_OFFSET_BITS=64 -Wno-unknown-pragmas -Wsign-compare -O2 -Wall -Werror -Wformat=2 -MMD -MP -D BUP_DEV_BUP_EXEC=1 -I/private/tmp/nix-build-bup-0.33.2.drv-0/source/src -I src -g lib/cmd/bup.c src/bup/compat.c src/bup/io.c -lpython3.10 -lcrypt -ldl -L/nix/store/vnn3dp5cyjlknkqxmi29vbg812ml5m7r-libxcrypt-4.4.35/lib -framework CoreFoundation -g -fPIE -o dev/bup-exec lib/cmd/bup.c:153:14: error: implicit declaration of function '_NSGetExecutablePath' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int rc = _NSGetExecutablePath(spath, &size); ^ 1 error generated. make: *** [GNUmakefile:185: dev/bup-exec] Error 1 ``` --- pkgs/tools/backup/bup/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix index 88b3693d7e99..7bea67dc621b 100644 --- a/pkgs/tools/backup/bup/default.nix +++ b/pkgs/tools/backup/bup/default.nix @@ -37,6 +37,8 @@ stdenv.mkDerivation { "LIBDIR=$(out)/lib/bup" ]; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=implicit-function-declaration"; + postInstall = '' wrapProgram $out/bin/bup \ --prefix PATH : ${lib.makeBinPath [ git par2cmdline ]} \