15 , extraScripts ? false
18 stdenv.mkDerivation rec {
22 src = fetchFromGitHub {
26 hash = "sha256-Vbxc6a6CK+wrBfs15dtjfRa1LJDKKyHMrg8tqsF7EX4=";
29 nativeBuildInputs = [ cmake ];
33 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib udev ]
34 ++ lib.optionals stdenv.hostPlatform.isDarwin [ portaudio ]
35 ++ lib.optionals gpsdSupport [ gpsd ]
36 ++ lib.optionals hamlibSupport [ hamlib ]
37 ++ lib.optionals extraScripts [ python3 perl espeak ];
39 preConfigure = lib.optionals (!extraScripts) ''
40 echo "" > scripts/CMakeLists.txt
44 substituteInPlace conf/CMakeLists.txt \
45 --replace /etc/udev/rules.d/ $out/lib/udev/rules.d/
46 substituteInPlace src/symbols.c \
47 --replace /usr/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt \
48 --replace /opt/local/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt
49 substituteInPlace src/decode_aprs.c \
50 --replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \
51 --replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt
52 substituteInPlace cmake/cpack/direwolf.desktop.in \
53 --replace 'Terminal=false' 'Terminal=true' \
54 --replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf'
55 substituteInPlace src/dwgpsd.c \
56 --replace 'GPSD_API_MAJOR_VERSION > 11' 'GPSD_API_MAJOR_VERSION > 14'
58 + lib.optionalString extraScripts ''
59 patchShebangs scripts/dwespeak.sh
60 substituteInPlace scripts/dwespeak.sh \
61 --replace espeak ${espeak}/bin/espeak
65 description = "Soundcard Packet TNC, APRS Digipeater, IGate, APRStt gateway";
66 homepage = "https://github.com/wb2osz/direwolf/";
67 license = licenses.gpl2;
68 platforms = platforms.unix;
69 maintainers = with maintainers; [ lasandell sarcasticadmin ];