lol
1{ stdenv, fetchFromGitHub
2, espeak, alsaLib, perl
3, python }:
4
5with stdenv.lib;
6
7stdenv.mkDerivation rec {
8 name = "direwolf-${version}";
9 version = "1.4";
10
11 src = fetchFromGitHub {
12 owner = "wb2osz";
13 repo = "direwolf";
14 rev = version;
15 sha256 = "033sffjs2dz48077hc58jr4lxxs8md1fyfh4lig6ib7pyigiv1y0";
16 };
17
18 buildInputs = [
19 espeak perl python
20 ] ++ (optional stdenv.isLinux alsaLib);
21
22 postPatch = ''
23 for i in Makefile.*; do
24 substituteInPlace "$i" \
25 --replace /usr/share $out/share
26 done
27
28 substituteInPlace dwespeak.sh \
29 --replace espeak ${espeak}/bin/espeak
30 '';
31
32 preInstall = ''
33 mkdir -p $out/bin
34 '';
35 installFlags = [ "INSTALLDIR=$(out)" ];
36
37 meta = {
38 description = "A Soundcard Packet TNC, APRS Digipeater, IGate, APRStt gateway";
39 homepage = https://github.com/wb2osz/direwolf/;
40 license = licenses.gpl2;
41 platforms = platforms.unix;
42 maintainers = [ maintainers.the-kenny ];
43 };
44}