all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Howard <christopher.howard@qlfiles.net>
To: 38650@debbugs.gnu.org
Subject: [bug#38650] [PATCH] gnu: adds hackrf
Date: Sun, 26 Apr 2020 03:06:18 -0800	[thread overview]
Message-ID: <542784b9e65b06a69bf1cd17f10cf4343b411b8e.camel@qlfiles.net> (raw)
In-Reply-To: <33d8820578a5011bfd66f694b32f2e60d273469d.camel@librehacker.com>

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

I have asked many times about the new release over the last few months,
and each time hackrf team says it is a week or so away. But their last
git commit was in February. Requesting to please proceed with the
latest commit as represented in this patch. I have added information to
the description as requested.

Using the old 2018 release would be unsatisfactory due to an annoying
bug related to maintaining connections to hackrf devices.

As an additional motivation for adding this, I believe you need
libhackrf installed to use hackrf with gnuradio, through the osmocom
interface. (I'm not at the moment quite clear on what exactly you have
to enable in the gnuradio package definitions to link those together.)
E.g., https://packages.debian.org/stretch/gr-osmosdr

-- 
Christopher Howard
p: +1 (907) 374-0257
w: https://librehacker.com
social: https://gnusocial.club/librehacker
gpg: ADDEAADE5D607C8D (keys.gnupg.net)

[-- Attachment #2: 0001-gnu-adds-hackrf.patch --]
[-- Type: text/x-patch, Size: 2725 bytes --]

From 7567d155fd3922fe27a3aaa3d155dc4f9db0a329 Mon Sep 17 00:00:00 2001
From: Christopher Howard <christopher@librehacker.com>
Date: Sun, 26 Apr 2020 02:52:48 -0800
Subject: [PATCH] gnu: adds hackrf

---
 gnu/packages/radio.scm | 57 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index fff68cf657..91908d47b5 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -654,6 +654,63 @@ for correctness.")
     (home-page "http://www.w1hkj.com/")
     (license license:gpl3+)))
 
+(define-public hackrf
+  ;; Using a git commit because there have been many many commits
+  ;; since the relase two years ago, but no sign of a promised
+  ;; release for many months now.
+  (let ((commit "43e6f99fe8543094d18ff3a6550ed2066c398862")
+        (revision "0"))
+    (package
+     (name "hackrf")
+     (version (git-version "2018.01.1" revision commit))
+     (source
+      (origin (method git-fetch)
+	      (uri (git-reference
+		    (url "https://github.com/mossmann/hackrf.git")
+		    (commit commit)))
+	      (file-name (git-file-name name version))
+	      (sha256
+	       (base32 "0avnv693xi0zsnrvkbfn0ln1r3s1iyj0bz7sc3gxay909av0pvbc"))))
+     (build-system cmake-build-system)
+     (arguments
+      '(#:configure-flags
+        (list "-DUDEV_RULES_GROUP=dialout"
+	      (string-append "-DUDEV_RULES_PATH="
+                             (assoc-ref %outputs "out")
+			     "/lib/udev/rules.d"))
+        #:phases
+	(modify-phases %standard-phases
+	  (add-before 'configure 'enter-source-directory
+		      (lambda _ (chdir "host") #t))
+	  (add-before 'install-license-files 'leave-source-directory
+		      (lambda _ (chdir "..") #t)))
+        #:tests? #f))                  ; no test suite
+     (native-inputs
+      `(("pkg-config" ,pkg-config)))
+     (inputs
+      `(("fftw" ,fftw)
+        ("fftwf" ,fftwf)
+	("libusb" ,libusb)))
+     (home-page "https://greatscottgadgets.com/hackrf/")
+     (synopsis "User-space library and utilities for HackRF SDR")
+     (description
+      "Command line utilities and a C library for controlling the HackRF
+Software Defined Radio (SDR) over USB.  Installing this package installs
+the userspace hackrf utilities and C library.  To install the hackrf
+udev rules, you must add this package as a system service via
+modify-services.  E.g.:
+
+@lisp
+(services
+ (modify-services
+  %desktop-services
+  (udev-service-type config =>
+   (udev-configuration (inherit config)
+    (rules (cons hackrf
+            (udev-configuration-rules config)))))))
+@end lisp")
+     (license license:gpl2))))
+
 (define-public hamlib
   (package
     (name "hamlib")
-- 
2.26.2


  parent reply	other threads:[~2020-04-26 11:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 14:45 [bug#38650] hackrf: new package Christopher Howard
2019-12-23  8:00 ` Danny Milosavljevic
2019-12-24  7:05   ` Christopher Howard
2020-03-31 20:22     ` Christopher Baines
2020-04-01  0:12       ` Christopher Howard
2020-04-01 17:22         ` Christopher Baines
2019-12-23 21:17 ` [bug#38650] hackrf.scm add to gnu/local.mk Jack Hill
2020-04-26 11:06 ` Christopher Howard [this message]
2020-04-27 15:33   ` [bug#38650] [PATCH] gnu: adds hackrf Guillaume Le Vaillant
2020-04-28  0:20     ` Christopher Howard
2020-04-28  8:29       ` bug#38650: " Guillaume Le Vaillant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542784b9e65b06a69bf1cd17f10cf4343b411b8e.camel@qlfiles.net \
    --to=christopher.howard@qlfiles.net \
    --cc=38650@debbugs.gnu.org \
    --cc=christopher@librehacker.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.