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

TiEmu Guix Package Definition

I submitted a package definition for TiEmu, a Ti calculator emulator:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40709#8

My build mysteriously is not able to load the ROMs that ship with it, but I was able to load pedrom fine from the original pedrom archive.

zs program running on pedrom on emulated TI-92

It should be fun to explorer different programs that can be run on pedrom. Mathematical programs will in principle be of the greatest interest, but I must say it is fun to be able to run pacman on a TI-89 :)

P.S. If any of my friends want to give me any TI calculators they aren’t using, I might be able to have some fun with those. I’m thinking TI-84 or fancier.

Libticonv Guix Package Definition

(define-public libticonv
  (package
    (name "libticonv")
    (version "1.1.5")
    (source (origin
              (method url-fetch)
              (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
              (sha256
               (base32
                "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
    (build-system gnu-build-system)
    (arguments
     ;; build fails with out --enable-iconv (...?)
     `(#:configure-flags (list "--enable-iconv")
       #:phases
       (modify-phases %standard-phases
         (replace 'unpack
           (lambda* (#:key source #:allow-other-keys)
             (invoke "tar" "xvkf" source)
             (invoke "tar" "xvkf"
                     (string-append "tilibs2/libticonv-"
                                    ,version ".tar.bz2"))
             (chdir (string-append "libticonv-" ,version))
             #t)))))
    (native-inputs
     `(("autoconf" ,autoconf)
       ("automake" ,automake)
       ("libtool" ,libtool)
       ("pkg-config" ,pkg-config)))
    (inputs
     `(("glib" ,glib)))
    (synopsis "Character conversion library for TI calculators:
A part of the TiLP project")
    (description
     "This project aims to develop a multi-platform linking program for
use with all TI graphing calculators (TI73 to V200PLT).")
    (home-page "http://lpg.ticalc.org/prj_tilp/")
    (license license:gpl2+)))

Libticables2 Guix Package Definition

(define-public libticables2
  (package
    (name "libticables2")
    (version "1.3.5")
    (source (origin
              (method url-fetch)
              (uri "https://www.ticalc.org/pub/unix/tilibs.tar.gz")
              (sha256
               (base32
                "07cfwwlidgx4fx88whnlch6y1342x16h15lkvkkdlp2y26sn2yxg"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags (list "--enable-libusb10")
       #:phases
       (modify-phases %standard-phases
         (replace 'unpack
           (lambda* (#:key source #:allow-other-keys)
             (invoke "tar" "xvkf" source)
             (invoke "tar" "xvkf"
                     (string-append "tilibs2/libticables2-"
                                    ,version ".tar.bz2"))
             (chdir (string-append "libticables2-" ,version))
             #t)))))
    (native-inputs
     `(("autoconf" ,autoconf)
       ("autogen" ,autogen)
       ("automake" ,automake)
       ("gettext" ,gnu-gettext)
       ("libtool" ,libtool)
       ("pkg-config" ,pkg-config)))
    (inputs
     `(("glib" ,glib)
       ("libusb" ,libusb)))
    (synopsis "Texas Instruments link cable library: A part of the TiLP project")
    (description
     "This project aims to develop a multi-platform linking program for
use with all TI graphing calculators (TI73 to V200PLT).")
    (home-page "http://lpg.ticalc.org/prj_tilp/")
    (license license:gpl2+)))

I am planning to submit this to Guix after completing definitions for the other tilibs2 components.

libticables: guix build notes

christopher@nightshade ~/Build/tilibs2/libticables2-1.3.5$ guix describe
Generation 16	Apr 11 2020 08:47:10	(current)
  guix 658505d
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 658505d7a92f0518e1fc4c965bdaa389a6e83f2c
christopher@nightshade ~/Build/tilibs2/libticables2-1.3.5$ guix environment --pure --ad-hoc gcc-toolchain autoconf automake grep sed coreutils tar xz findutils diffutils m4 autogen libtool pkg-config libusb gawk

Can run autoconf -i -f and configure --enable-usb10 and make without errors, though two deprecation warnings appear.

Am working on package definitions for tiemu and dependencies.

Building LibreCMC in Guix

Was trying today to build v1.5.1 in a Guix –pure environment. This was a bit painful to figure out due to defects in the build scripts. For starters, one build script does not properly recognize the presence of git in your path, so you must delete the following lines from include/prereq-build.mk:

$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule))

Now here is a working Guix environment:

christopher@eowyn ~/Build/librecmc-lts$ guix environment --pure --ad-hoc gcc-toolchain perl make git coreutils grep sed bash which pkg-config binutils ncurses wget tar patch diffutils unzip bzip2 findutils gawk gengetopt python2 python file util-linux nss-certs

There is another bug in the build scripts that for some reason cannot see the runtime path to some of the ncurses libraries. Also, build scripts do not detect gcc, so:

christopher@eowyn ~/Build/librecmc-lts [env]$ pkg-config --libs ncurses
-L/gnu/store/gzp4ig4rdb1qf4i5dy1d9nl0zmj5q09y-ncurses-6.1-20190609/lib -lncursesw
christopher@eowyn ~/Build/librecmc-lts [env]$ LD_LIBRARY_PATH=/gnu/store/gzp4ig4rdb1qf4i5dy1d9nl0zmj5q09y-ncurses-6.1-20190609/lib CC=gcc make menuconfig

I had a thought to patch the librecmc build scripts, and then work on a LibreCMC Guix package definition. But not sure how soon I will get to that.