3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/radio/direwolf/default.nix

49 lines
1.5 KiB
Nix
Raw Normal View History

2020-12-04 17:52:02 +00:00
{ stdenv, fetchFromGitHub, cmake, alsaLib, espeak, glibc, gpsd
2020-07-18 01:46:44 +01:00
, hamlib, perl, python, udev }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "direwolf";
2020-12-04 17:52:02 +00:00
version = "1.6";
2020-07-18 01:46:44 +01:00
src = fetchFromGitHub {
owner = "wb2osz";
repo = "direwolf";
rev = version;
2020-12-04 17:52:02 +00:00
sha256 = "0xmz64m02knbrpasfij4rrq53ksxna5idxwgabcw4n2b1ig7pyx5";
2020-07-18 01:46:44 +01:00
};
2020-12-04 17:52:02 +00:00
nativeBuildInputs = [ cmake ];
2020-07-18 01:46:44 +01:00
buildInputs = [
espeak gpsd hamlib perl python
] ++ (optionals stdenv.isLinux [alsaLib udev]);
2020-12-04 17:52:02 +00:00
patches = [
./udev-fix.patch
];
2020-07-18 01:46:44 +01:00
postPatch = ''
2020-12-04 17:52:02 +00:00
substituteInPlace src/symbols.c \
2020-07-18 01:46:44 +01: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 17:52:02 +00:00
substituteInPlace src/decode_aprs.c \
2020-07-18 01:46:44 +01:00
--replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \
--replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt
2020-12-04 17:52:02 +00:00
substituteInPlace scripts/dwespeak.sh \
2020-07-18 01:46:44 +01:00
--replace espeak ${espeak}/bin/espeak
2020-12-04 17:52:02 +00:00
substituteInPlace cmake/cpack/direwolf.desktop.in \
--replace 'Terminal=false' 'Terminal=true' \
--replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf' \
2020-07-18 01:46:44 +01: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 ];
};
}