Merge pull request #93379 from lasandell/direwolf-1.5

direwolf 1.4 -> 1.5
This commit is contained in:
markuskowa 2020-08-18 10:40:45 +02:00 committed by GitHub
commit 0657fe4bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 44 deletions

View File

@ -1,43 +0,0 @@
{ stdenv, fetchFromGitHub
, espeak, alsaLib, perl
, python }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "direwolf";
version = "1.4";
src = fetchFromGitHub {
owner = "wb2osz";
repo = "direwolf";
rev = version;
sha256 = "033sffjs2dz48077hc58jr4lxxs8md1fyfh4lig6ib7pyigiv1y0";
};
buildInputs = [
espeak perl python
] ++ (optional stdenv.isLinux alsaLib);
postPatch = ''
for i in Makefile.*; do
substituteInPlace "$i" \
--replace /usr/share $out/share
done
substituteInPlace dwespeak.sh \
--replace espeak ${espeak}/bin/espeak
'';
preInstall = ''
mkdir -p $out/bin
'';
installFlags = [ "INSTALLDIR=$(out)" ];
meta = {
description = "A Soundcard Packet TNC, APRS Digipeater, IGate, APRStt gateway";
homepage = "https://github.com/wb2osz/direwolf/";
license = licenses.gpl2;
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,57 @@
{ stdenv, fetchFromGitHub
, alsaLib, espeak, glibc, gpsd
, hamlib, perl, python, udev }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "direwolf";
version = "1.5";
src = fetchFromGitHub {
owner = "wb2osz";
repo = "direwolf";
rev = version;
sha256 = "1w55dv9xqgc9mpincsj017838vmvdy972fhis3ddskyfvhhzgcsk";
};
buildInputs = [
espeak gpsd hamlib perl python
] ++ (optionals stdenv.isLinux [alsaLib udev]);
makeFlags = [ "DESTDIR=$(out)" ];
postPatch = ''
substituteInPlace symbols.c \
--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
substituteInPlace decode_aprs.c \
--replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \
--replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt
substituteInPlace dwespeak.sh \
--replace espeak ${espeak}/bin/espeak
'' + (optionalString stdenv.isLinux ''
substituteInPlace Makefile.linux \
--replace /usr/include/pthread.h ${stdenv.glibc.dev}/include/pthread.h \
--replace /usr/include/alsa ${alsaLib.dev}/include/alsa \
--replace /usr/include/gps.h ${gpsd}/include/gps.h \
--replace /usr/include/hamlib ${hamlib}/include/hamlib \
--replace /usr/include/libudev.h ${udev.dev}/include/libudev.h \
--replace /etc/udev $out/etc/udev \
--replace 'Exec=xterm -hold -title \"Dire Wolf\" -bg white -e \"$(DESTDIR)/bin/direwolf\"' "Exec=$out/bin/direwolf" \
--replace '#Terminal=true' 'Terminal=true' \
--replace 'Path=$(HOME)' '#Path='
'');
preInstall = ''
mkdir -p $out/bin
'';
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 ];
};
}

View File

@ -19696,7 +19696,7 @@ in
inherit (pkgs.gnome2) libart_lgpl libgnomeui;
};
direwolf = callPackage ../applications/misc/direwolf { };
direwolf = callPackage ../applications/radio/direwolf { };
dirt = callPackage ../applications/audio/dirt {};