Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions pkgs/by-name/di/direwolf-unstable/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
lib,
fetchFromGitHub,
direwolf,
nix-update-script,
hamlibSupport ? true,
gpsdSupport ? true,
extraScripts ? false,
}:

(direwolf.override {
inherit hamlibSupport gpsdSupport extraScripts;
}).overrideAttrs
(oldAttrs: {
version = "1.7-unstable-2025-04-29";

src = fetchFromGitHub {
owner = "wb2osz";
repo = "direwolf";
rev = "486b3cf1f685502af7dc87b0f9c9cead6800d47b";
hash = "sha256-VFBkOWHGZP7GjekHL3GY3BGkVXQbtyD1YPmu0xaQ1ME=";
};

postPatch =
builtins.replaceStrings
[
"decode_aprs.c"
"tocalls.txt"
"--replace-fail /etc/udev/rules.d/"
]
[
"deviceid.c"
"tocalls.yaml"
"--replace-fail /usr/lib/udev/rules.d/ $out/lib/udev/rules.d/ --replace-fail /etc/udev/rules.d/"
]
oldAttrs.postPatch;

dontVersionCheck = true;

passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch=dev" ]; };
})
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@
alsa-lib,
gpsd,
gpsdSupport ? false,
hamlib,
hamlib_4,
hamlib ? hamlib_4,
hamlibSupport ? true,
perl,
portaudio,
python3,
espeak,
udev,
udevCheckHook,
versionCheckHook,
nix-update-script,
extraScripts ? false,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "direwolf";
version = "1.7";

src = fetchFromGitHub {
owner = "wb2osz";
repo = "direwolf";
rev = version;
tag = finalAttrs.version;
hash = "sha256-Vbxc6a6CK+wrBfs15dtjfRa1LJDKKyHMrg8tqsF7EX4=";
};

Expand Down Expand Up @@ -57,42 +60,47 @@ stdenv.mkDerivation rec {
perl
espeak
];
nativeInstallCheckInputs = [ versionCheckHook ];

preConfigure = lib.optionals (!extraScripts) ''
echo "" > scripts/CMakeLists.txt
'';

postPatch = ''
substituteInPlace conf/CMakeLists.txt \
--replace /etc/udev/rules.d/ $out/lib/udev/rules.d/
--replace-fail /etc/udev/rules.d/ $out/lib/udev/rules.d/
substituteInPlace src/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
--replace-fail /usr/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt \
--replace-fail /opt/local/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt
substituteInPlace src/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
--replace-fail /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \
--replace-fail /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt
substituteInPlace cmake/cpack/direwolf.desktop.in \
--replace 'Terminal=false' 'Terminal=true' \
--replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf'
substituteInPlace src/dwgpsd.c \
--replace 'GPSD_API_MAJOR_VERSION > 11' 'GPSD_API_MAJOR_VERSION > 14'
--replace-fail 'Terminal=false' 'Terminal=true' \
--replace-fail 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf'
''
+ lib.optionalString extraScripts ''
patchShebangs scripts/dwespeak.sh
substituteInPlace scripts/dwespeak.sh \
--replace espeak ${espeak}/bin/espeak
--replace-fail espeak ${espeak}/bin/espeak
'';

doInstallCheck = true;

meta = with lib; {
versionCheckProgramArg = [ "-u" ];

passthru.updateScript = nix-update-script { };

meta = {
description = "Soundcard Packet TNC, APRS Digipeater, IGate, APRStt gateway";
homepage = "https://github.com/wb2osz/direwolf/";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [
mainProgram = "direwolf";
license = lib.licenses.gpl2;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
lasandell
sarcasticadmin
pandapip1
];
};
}
})
4 changes: 0 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10959,10 +10959,6 @@ with pkgs;

dfasma = libsForQt5.callPackage ../applications/audio/dfasma { };

direwolf = callPackage ../applications/radio/direwolf {
hamlib = hamlib_4;
};

djv = callPackage ../by-name/dj/djv/package.nix { openexr = openexr_2; };

djview4 = djview;
Expand Down
Loading