Updated Guix package for HackRF

Am attempting to upload the revised package definition at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38650, but haven’t seen it show up yet. So here is the package definition (added to gnu/packages/radio.scm):

(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))))
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s