summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-10-26 12:45:42 +0000
committerMathieu Othacehe <othacehe@gnu.org>2021-10-26 12:45:49 +0000
commit45f787593768bcb092a0819fcf7d33b071e68757 (patch)
tree44a25dc5f744ec4ff3da477ab1cfbf0d1c62f573 /gnu
parentf8e260e5a2be2d2961bfdf7ad9b5b8da546c9f74 (diff)
downloadguix-45f787593768bcb092a0819fcf7d33b071e68757.tar.gz
gnu: Add uuu.
* gnu/packages/flashing-tools.scm (uuu): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/flashing-tools.scm56
1 files changed, 55 insertions, 1 deletions
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 8b881a5c2c..c5f1abccbf 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,7 +51,8 @@
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages libftdi)
   #:use-module (gnu packages pciutils)
-  #:use-module (gnu packages qt))
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages tls))
 
 (define-public flashrom
   (package
@@ -520,3 +522,55 @@ Unifinished Extensible Firmware Interface (UEFI) images.")
 manipulating EPROM load files.  It reads and writes numerous EPROM file
 formats, and can perform many different manipulations.")
     (license license:gpl3+)))
+
+(define-public uuu
+  (package
+    (name "uuu")
+    (version "1.4.165")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/NXPmicro/mfgtools")
+             (commit (string-append "uuu_" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0k309lp27d4k6x4qq0badbk8i47xsc6f3fffz73650iyfs4hcniw"))))
+    (arguments
+     `(#:tests? #f                      ; no tests
+       #:modules ((guix build utils)
+                  (ice-9 popen)
+                  (srfi srfi-26)
+                  (guix build cmake-build-system))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'fix-version-gen
+           (lambda _
+             (call-with-output-file ".tarball-version"
+               (lambda (port)
+                 (display ,version port)))))
+         (add-after 'install 'install-udev-rules
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (uuu (string-append out "/bin/uuu"))
+                    (pipe (open-pipe* OPEN_READ uuu "-udev"))
+                    (rules
+                     (string-append out "/lib/udev/rules.d/70-uuu.rules")))
+               (mkdir-p (string-append out "/lib/udev/rules.d"))
+               (call-with-output-file rules
+                 (cut dump-port pipe <>))))))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libusb" ,libusb)
+       ("bzip2" ,bzip2)
+       ("zlib" ,zlib)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)))
+    (home-page "https://github.com/NXPmicro/mfgtools")
+    (synopsis "Freescale/NXP I.MX chip image deploy tools")
+    (description "@code{uuu} is a command line tool, evolved out of MFGTools.
+It can be used to upload images to I.MX SoC's using at least their boot ROM.")
+    (license license:bsd-3)))