gnu: teensy-loader-cli: Update to 2.2.

* gnu/packages/flashing-tools.scm (teensy-loader-cli): Update to 2.2.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Peter Polidoro 2022-06-14 14:58:53 -04:00 committed by Ludovic Courtès
parent 2ec85ed405
commit 88f6776728
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -9,6 +9,7 @@
;;; Copyright © 20182021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 20182021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org> ;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -217,56 +218,48 @@ firmware from it.")
(license license:gpl2+))) (license license:gpl2+)))
(define-public teensy-loader-cli (define-public teensy-loader-cli
;; The repo does not tag versions nor does it use releases, but a commit (package
;; message says "Importing 2.1", while the sourcce still says "2.0". So pin (name "teensy-loader-cli")
;; to a fixed commit. (version "2.2")
(let ((commit "f289b7a2e5627464044249f0e5742830e052e360")) (source
(package (origin
(name "teensy-loader-cli") (method git-fetch)
(version (git-version "2.1" "1" commit)) (uri (git-reference
(source (url "https://github.com/PaulStoffregen/teensy_loader_cli")
(origin (commit version)))
(method git-fetch) (sha256 (base32 "12n8ifz4gph1anhwd8if3j1kw0wc3yxf48abbyxl8071l9vj3m0b"))
(uri (git-reference (file-name (git-file-name name version))
(url "https://github.com/PaulStoffregen/teensy_loader_cli") (modules '((guix build utils)))
(commit commit))) (snippet
(sha256 (base32 "0sssim56pwsxp5cp5dlf6mi9h5fx2592m6j1g7abnm0s09b0lpdx")) `(begin
(file-name (git-file-name name version)) ;; Remove example flash files and teensy rebooter flash binaries.
(modules '((guix build utils))) (for-each delete-file (find-files "." "\\.(elf|hex)$"))
(snippet #t))
`(begin
;; Remove example flash files and teensy rebooter flash binaries.
(for-each delete-file (find-files "." "\\.(elf|hex)$"))
;; Fix the version
(substitute* "teensy_loader_cli.c"
(("Teensy Loader, Command Line, Version 2.0\\\\n")
(string-append "Teensy Loader, Command Line, " ,version "\\n")))
#t))
(patches (search-patches "teensy-loader-cli-help.patch")))) (patches (search-patches "teensy-loader-cli-help.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:tests? #f ;; Makefile has no test target '(#:tests? #f ;; Makefile has no test target
#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)) #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))) (bin (string-append out "/bin")))
(install-file "teensy_loader_cli" bin) (install-file "teensy_loader_cli" bin)
#t)))))) #t))))))
(inputs (inputs
(list libusb-compat)) (list libusb-compat))
(synopsis "Command line firmware uploader for Teensy development boards") (synopsis "Command line firmware uploader for Teensy development boards")
(description (description
"The Teensy loader program communicates with your Teensy board when the "The Teensy loader program communicates with your Teensy board when the
HalfKay bootloader is running, so you can upload new programs and run them. HalfKay bootloader is running, so you can upload new programs and run them.
You need to add the udev rules to make the Teensy update available for You need to add the udev rules to make the Teensy update available for
non-root users.") non-root users.")
(home-page "https://www.pjrc.com/teensy/loader_cli.html") (home-page "https://www.pjrc.com/teensy/loader_cli.html")
(license license:gpl3)))) (license license:gpl3)))
(define-public rkflashtool (define-public rkflashtool
(let ((commit "8966c4e277de8148290554aaaa4146a3a84a3c53") (let ((commit "8966c4e277de8148290554aaaa4146a3a84a3c53")