[bug#35169] gnu: Add urh.

Message ID 20190406101033.24342-1-arunisaac@systemreboot.net
State Accepted
Headers show
Series [bug#35169] gnu: Add urh. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Arun Isaac April 6, 2019, 10:10 a.m. UTC
* gnu/packages/ham-radio.scm (urh): New variable.
---
 gnu/packages/ham-radio.scm | 40 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

Comments

Danny Milosavljevic April 6, 2019, 10:22 a.m. UTC | #1
On Sat,  6 Apr 2019 15:40:33 +0530
Arun Isaac <arunisaac@systemreboot.net> wrote:

> +     `(#:tests? #f)) ; tests require an X server

urh uses Qt as GUI library, so maybe

(setenv "QT_QPA_PLATFORM" "offscreen")

would be enough (in a phase before 'check).

Otherwise make it start an X server :)

Otherwise LGTM!
Arun Isaac April 9, 2019, 9:24 a.m. UTC | #2
>> +     `(#:tests? #f)) ; tests require an X server
>
> urh uses Qt as GUI library, so maybe
>
> (setenv "QT_QPA_PLATFORM" "offscreen")
>
> would be enough (in a phase before 'check).
>
> Otherwise make it start an X server :)

I'll work on this over the weekend and get back to you.
Arun Isaac April 16, 2019, 10:31 a.m. UTC | #3
>> +     `(#:tests? #f)) ; tests require an X server
>
> urh uses Qt as GUI library, so maybe
>
> (setenv "QT_QPA_PLATFORM" "offscreen")

This works, but there are a lot of other failing tests. Many of them
appear to be upstream bugs. I'm trying to fix them one by one and get
this package ready.
Guillaume Le Vaillant April 29, 2022, 12:45 p.m. UTC | #4
Hi Arun,

I made an updated package definition for urh based on yours and pushed
it as 653eef9b41ad74cb0e0aa10ed4ca691359b2515a.
Thanks.
Arun Isaac May 2, 2022, 5:54 a.m. UTC | #5
Thanks, Guillaume!

Patch

diff --git a/gnu/packages/ham-radio.scm b/gnu/packages/ham-radio.scm
index 6e91866905..16965810fc 100644
--- a/gnu/packages/ham-radio.scm
+++ b/gnu/packages/ham-radio.scm
@@ -1,5 +1,5 @@ 
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,11 +20,13 @@ 
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system python))
@@ -82,3 +84,39 @@  growing list of radios across several manufacturers and allows transferring of
 memory contents between them.")
     (license (list license:gpl3+
                    license:lgpl3+)))) ; chirp/elib_intl.py
+
+(define-public urh
+  (package
+    (name "urh")
+    (version "2.5.7")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/jopohl/urh")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "110fwlj2fw8jgrsgqfkha7lx8f06w0ymh51mgpckx8a0wycznhcy"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-psutil" ,python-psutil)
+       ("python-pyqt" ,python-pyqt)
+       ("python-pyzmq" ,python-pyzmq)))
+    (native-inputs
+     `(("python-cython" ,python-cython)))
+    (arguments
+     `(#:tests? #f)) ; tests require an X server
+    (home-page "https://github.com/jopohl/urh")
+    (synopsis "Investigate unknown wireless protocols")
+    (description "The Universal Radio Hacker (URH) is a software for
+investigating unknown wireless protocols.  Features include hardware
+interfaces for common Software Defined Radios, easy demodulation of signals,
+assigning participants to keep overview of your data, customizable decodings
+to crack even sophisticated encodings like CC1101 data whitening, assign
+labels to reveal the logic of the protocol, fuzzing component to find security
+leaks, modulation support to inject the data back into the system, simulation
+environment to perform stateful attacks.")
+    (license license:gpl3)))