19 stdenv.mkDerivation rec {
23 src = fetchFromGitHub {
27 hash = "sha256-Vbxc6a6CK+wrBfs15dtjfRa1LJDKKyHMrg8tqsF7EX4=";
30 nativeBuildInputs = [ cmake ];
35 lib.optionals stdenv.hostPlatform.isLinux [
39 ++ lib.optionals stdenv.hostPlatform.isDarwin [ portaudio ]
40 ++ lib.optionals gpsdSupport [ gpsd ]
41 ++ lib.optionals hamlibSupport [ hamlib ]
42 ++ lib.optionals extraScripts [
48 preConfigure = lib.optionals (!extraScripts) ''
49 echo "" > scripts/CMakeLists.txt
54 substituteInPlace conf/CMakeLists.txt \
55 --replace /etc/udev/rules.d/ $out/lib/udev/rules.d/
56 substituteInPlace src/symbols.c \
57 --replace /usr/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt \
58 --replace /opt/local/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt
59 substituteInPlace src/decode_aprs.c \
60 --replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \
61 --replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt
62 substituteInPlace cmake/cpack/direwolf.desktop.in \
63 --replace 'Terminal=false' 'Terminal=true' \
64 --replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf'
65 substituteInPlace src/dwgpsd.c \
66 --replace 'GPSD_API_MAJOR_VERSION > 11' 'GPSD_API_MAJOR_VERSION > 14'
68 + lib.optionalString extraScripts ''
69 patchShebangs scripts/dwespeak.sh
70 substituteInPlace scripts/dwespeak.sh \
71 --replace espeak ${espeak}/bin/espeak
75 description = "Soundcard Packet TNC, APRS Digipeater, IGate, APRStt gateway";
76 homepage = "https://github.com/wb2osz/direwolf/";
77 license = licenses.gpl2;
78 platforms = platforms.unix;
79 maintainers = with maintainers; [