summary refs log tree commit diff
path: root/pkgs/tools/backup
diff options
context:
space:
mode:
authorAtemu <atemu.main@gmail.com>2023-07-10 13:23:05 +0200
committerAtemu <atemu.main@gmail.com>2023-07-10 13:23:05 +0200
commitea1d1a8f5283dd585149e61215cb40650304722c (patch)
tree1d78d9faae4456614b050b73d11dcbbfcd281600 /pkgs/tools/backup
parentb9ebd80c7dbcdec2240c5baae334365eaf3d7230 (diff)
downloadnixpkgs-ea1d1a8f5283dd585149e61215cb40650304722c.tar
nixpkgs-ea1d1a8f5283dd585149e61215cb40650304722c.tar.gz
nixpkgs-ea1d1a8f5283dd585149e61215cb40650304722c.tar.bz2
nixpkgs-ea1d1a8f5283dd585149e61215cb40650304722c.tar.lz
nixpkgs-ea1d1a8f5283dd585149e61215cb40650304722c.tar.xz
nixpkgs-ea1d1a8f5283dd585149e61215cb40650304722c.tar.zst
nixpkgs-ea1d1a8f5283dd585149e61215cb40650304722c.zip
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
```
Diffstat (limited to 'pkgs/tools/backup')
-rw-r--r--pkgs/tools/backup/bup/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix
index 88b3693d7e9..7bea67dc621 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 ]} \