soundtracker: Fix on Darwin

authored by

OPNA2608 and committed by
Francesco Gazzetta
ade48138 7cc5590b

+24 -4
+24 -4
pkgs/applications/audio/soundtracker/default.nix
··· 1 1 { lib, stdenv 2 2 , fetchurl 3 3 , pkg-config 4 - , autoconf 4 + , autoreconfHook 5 5 , gtk2 6 6 , alsa-lib 7 7 , SDL ··· 23 23 sha256 = "0nh0dwz8nldc040q6n06vlazhss8ms42r2dffhjcrqj3hbrvfx82"; 24 24 }; 25 25 26 + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 27 + # Darwin binutils don't support D option for ar 28 + # ALSA macros are missing on Darwin, causing error 29 + substituteInPlace configure.ac \ 30 + --replace ARFLAGS=crD ARFLAGS=cru \ 31 + --replace AM_PATH_ALSA '#AM_PATH_ALSA' 32 + # Avoid X11-specific workaround code on more than just Windows 33 + substituteInPlace app/keys.c \ 34 + --replace '!defined(_WIN32)' '!defined(_WIN32) && !defined(__APPLE__)' 35 + # "The application with bundle ID (null) is running setugid(), which is not allowed." 36 + sed -i -e '/seteuid/d' -e '/setegid/d' app/main.c 37 + ''; 38 + 39 + configureFlags = [ 40 + "--with-graphics-backend=gdk" 41 + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ 42 + "--disable-alsa" 43 + ]; 44 + 45 + enableParallelBuilding = true; 46 + 26 47 nativeBuildInputs = [ 27 48 pkg-config 28 - autoconf 49 + autoreconfHook 29 50 ]; 51 + 30 52 buildInputs = [ 31 53 gtk2 32 54 SDL ··· 49 71 license = licenses.gpl2Plus; 50 72 maintainers = with maintainers; [ fgaz ]; 51 73 platforms = platforms.all; 52 - # gdk/gdkx.h not found 53 - broken = stdenv.isDarwin; 54 74 }; 55 75 }