gnu: icecat: Update to 78.10.0-guix0-preview1 [security fixes].
[jackhill/guix/guix.git] / gnu / packages / axoloti.scm
index 94d3d81..0b12e4f 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml))
 
+;; XXX The patch does not apply to libusb 1.0.24.
+;; See https://github.com/axoloti/axoloti/issues/464
 (define libusb-for-axoloti
-  (package (inherit libusb)
-    (name "axoloti-libusb")
-    (version (package-version libusb))
+  (package
+    (inherit libusb)
+    (version "1.0.23")
     (source
      (origin
-       (inherit (package-source libusb))
-       (patches (list (search-patch "libusb-for-axoloti.patch")))))))
+      (method url-fetch)
+      (uri (string-append "https://github.com/libusb/libusb/"
+                          "releases/download/v" version
+                          "/libusb-" version ".tar.bz2"))
+      (sha256
+       (base32 "13dd2a9x290d1q8nb1lqiaf36grcvns5ripk5k2xm0lajmpc04fv"))
+      (patches (list (search-patch "libusb-for-axoloti.patch")))))))
 
 (define dfu-util-for-axoloti
   (package (inherit dfu-util)
@@ -71,7 +78,7 @@
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/axoloti/axoloti.git")
+             (url "https://github.com/axoloti/axoloti")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
          (delete 'configure)
          (replace 'build
            ;; Build Axoloti firmware with cross-compiler
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((toolchain (assoc-ref inputs "cross-toolchain"))
-                    (headers   (string-append
-                                toolchain
-                                "/arm-none-eabi/include:"
-                                toolchain
-                                "/arm-none-eabi/include/arm-none-eabi/armv7e-m")))
-               (setenv "CROSS_CPATH" headers)
-               (setenv "CROSS_CPLUS_INCLUDE_PATH" headers)
-               (setenv "CROSS_LIBRARY_PATH"
-                       (string-append toolchain
-                                      "/arm-none-eabi/lib")))
+           (lambda _
              (with-directory-excursion "platform_linux"
                (invoke "sh" "compile_firmware.sh"))))
          (replace 'install
@@ -367,7 +363,7 @@ patcher application.")))
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/axoloti/axoloti.git")
+             (url "https://github.com/axoloti/axoloti")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
@@ -527,7 +523,7 @@ patcher application.")))
                (install-file "dist/Axoloti.jar" share)
 
                ;; Install old firmware
-               (let ((target (string-append share "/old_firmware/"))
+               (let ((target (string-append share "/old_firmware/firmware-1.0.12"))
                      (old-firmware
                       (string-append (assoc-ref inputs "axoloti-runtime")
                                      "/share/axoloti/firmware/")))
@@ -557,7 +553,7 @@ patcher application.")))
                                         toolchain
                                         "/arm-none-eabi/include:"
                                         toolchain
-                                        "/arm-none-eabi/include/arm-none-eabi/armv7e-m")))
+                                        "/arm-none-eabi/include/arm-none-eabi/thumb/v7e-m")))
                        (display
                         (string-append "#!" (which "sh") "\n"
                                        "export CROSS_CPATH=" includes "\n"
@@ -607,7 +603,7 @@ patcher application.")))
            (origin
              (method git-fetch)
              (uri (git-reference
-                   (url "https://github.com/JohannesTaelman/elfloader.git")
+                   (url "https://github.com/JohannesTaelman/elfloader")
                    (commit commit)))
              (file-name (git-file-name "elfloader" commit))
              (sha256