nixpkgs/pkgs/applications/radio/direwolf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.7 KiB
Nix
Raw Normal View History

2021-11-13 23:28:25 +01:00
{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, espeak, gpsd
2021-03-25 12:17:45 +01:00
, hamlib, perl, python3, udev }:
2020-07-18 02:46:44 +02:00
2021-01-15 06:42:41 +01:00
with lib;
2020-07-18 02:46:44 +02:00
stdenv.mkDerivation rec {
pname = "direwolf";
2020-12-04 18:52:02 +01:00
version = "1.6";
2020-07-18 02:46:44 +02:00
src = fetchFromGitHub {
owner = "wb2osz";
repo = "direwolf";
rev = version;
2020-12-04 18:52:02 +01:00
sha256 = "0xmz64m02knbrpasfij4rrq53ksxna5idxwgabcw4n2b1ig7pyx5";
2020-07-18 02:46:44 +02:00
};
2020-12-04 18:52:02 +01:00
nativeBuildInputs = [ cmake ];
2021-03-25 12:17:45 +01:00
strictDeps = true;
2020-07-18 02:46:44 +02:00
buildInputs = [
2021-03-25 12:17:45 +01:00
espeak gpsd hamlib perl python3
] ++ (optionals stdenv.isLinux [alsa-lib udev]);
2020-07-18 02:46:44 +02:00
postPatch = ''
2021-10-03 00:56:12 +02:00
substituteInPlace conf/CMakeLists.txt \
--replace /etc/udev/rules.d/ $out/lib/udev/rules.d/
2020-12-04 18:52:02 +01:00
substituteInPlace src/symbols.c \
2020-07-18 02:46:44 +02:00
--replace /usr/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt \
--replace /opt/local/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt
2020-12-04 18:52:02 +01:00
substituteInPlace src/decode_aprs.c \
2020-07-18 02:46:44 +02:00
--replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \
--replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt
2021-10-03 00:56:12 +02:00
patchShebangs scripts/dwespeak.sh
2020-12-04 18:52:02 +01:00
substituteInPlace scripts/dwespeak.sh \
2020-07-18 02:46:44 +02:00
--replace espeak ${espeak}/bin/espeak
2020-12-04 18:52:02 +01:00
substituteInPlace cmake/cpack/direwolf.desktop.in \
--replace 'Terminal=false' 'Terminal=true' \
2021-10-03 00:56:12 +02:00
--replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf'
substituteInPlace src/dwgpsd.c \
--replace 'GPSD_API_MAJOR_VERSION > 11' 'GPSD_API_MAJOR_VERSION > 14'
2020-07-18 02:46:44 +02:00
'';
meta = {
description = "A Soundcard Packet TNC, APRS Digipeater, IGate, APRStt gateway";
homepage = "https://github.com/wb2osz/direwolf/";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ lasandell ];
};
}