Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urh: 2.9.6 -> 2.9.8; install desktop file #357930

Merged
merged 11 commits into from
Dec 5, 2024
32 changes: 29 additions & 3 deletions pkgs/by-name/ur/urh/package.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{ stdenv, lib, fetchFromGitHub, python3Packages
, hackrf, rtl-sdr, airspy, limesuite, libiio
, libbladeRF
, imagemagick
, makeDesktopItem
, copyDesktopItems
, qt5
, wrapGAppsHook3
, USRPSupport ? false, uhd }:

python3Packages.buildPythonApplication rec {
pname = "urh";
version = "2.9.6";
version = "2.9.8";

src = fetchFromGitHub {
owner = "jopohl";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-4Fe2+BUdnVdNQHqZeftXLabn/vTzgyynOtqy0rAb0Rk=";
sha256 = "sha256-r3d80dzGwgf5Tuwt1IWGcmNbblwBNKTKKm+GGx1r2HE=";
Aleksanaa marked this conversation as resolved.
Show resolved Hide resolved
};

nativeBuildInputs = [ qt5.wrapQtAppsHook wrapGAppsHook3 ];
nativeBuildInputs = [ qt5.wrapQtAppsHook wrapGAppsHook3 copyDesktopItems
];
Aleksanaa marked this conversation as resolved.
Show resolved Hide resolved
buildInputs = [ hackrf rtl-sdr airspy limesuite libiio libbladeRF ]
++ lib.optional USRPSupport uhd
++ lib.optional stdenv.hostPlatform.isLinux qt5.qtwayland;
Expand All @@ -25,12 +29,34 @@ python3Packages.buildPythonApplication rec {
pyqt5 numpy psutil cython pyzmq pyaudio setuptools
];

# dont double wrap
# https://nixos.org/manual/nixpkgs/stable/#ssec-gnome-common-issues-double-wrapped
dontWrapGApps = true;
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';

postFixup = ''
wrapQtApp $out/bin/urh
'';
Aleksanaa marked this conversation as resolved.
Show resolved Hide resolved

doCheck = false;

desktopItems = [
(makeDesktopItem {
name = pname;
Aleksanaa marked this conversation as resolved.
Show resolved Hide resolved
exec = "urh";
icon = "urh";
desktopName = "Universal Radio Hacker";
categories = [ "Network" "HamRadio" ];
comment = meta.description;
})
];

postInstall = ''
install -Dm644 data/icons/appicon.png $out/share/pixmaps/urh.png
'';

meta = with lib; {
homepage = "https://github.com/jopohl/urh";
description = "Universal Radio Hacker: investigate wireless protocols like a boss";
Expand Down