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

* urh: 2.9.6 -> 2.9.8

* urh: dont double wrap binary with GApps

Fix for previous pull-request #357400. See https://nixos.org/manual/nixpkgs/stable/#ssec-gnome-common-issues-double-wrapped

* urh: install desktop-file

---------

Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
Co-authored-by: Aleksana <alexander.huang.y@gmail.com>
This commit is contained in:
Paw Møller
2024-12-05 09:35:56 +01:00
committed by GitHub
parent d53fb123cd
commit 47b5e2e54c
+30 -5
View File
@@ -1,22 +1,25 @@
{ 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=";
hash = "sha256-r3d80dzGwgf5Tuwt1IWGcmNbblwBNKTKKm+GGx1r2HE=";
};
nativeBuildInputs = [ qt5.wrapQtAppsHook wrapGAppsHook3 ];
nativeBuildInputs = [ qt5.wrapQtAppsHook wrapGAppsHook3 copyDesktopItems ];
buildInputs = [ hackrf rtl-sdr airspy limesuite libiio libbladeRF ]
++ lib.optional USRPSupport uhd
++ lib.optional stdenv.hostPlatform.isLinux qt5.qtwayland;
@@ -25,12 +28,34 @@ python3Packages.buildPythonApplication rec {
pyqt5 numpy psutil cython pyzmq pyaudio setuptools
];
postFixup = ''
wrapQtApp $out/bin/urh
# dont double wrap
# https://nixos.org/manual/nixpkgs/stable/#ssec-gnome-common-issues-double-wrapped
dontWrapGApps = true;
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=(
''${gappsWrapperArgs[@]}
''${qtWrapperArgs[@]}
)
'';
doCheck = false;
desktopItems = [
(makeDesktopItem {
name = "urh";
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";