me
/
guix
Archived
1
0
Fork 0

gnu: axoloti-runtime: Simplify with G-expression.

* gnu/packages/axoloti.scm (axoloti-runtime)[arguments]: Use G-expression to
simplify; remove trailing #T from build phases.

Change-Id: Ic9628b58c0e2b7816af6b7b42ab1aff927b4b0da
master
Ricardo Wurmus 2024-04-04 21:42:23 +02:00
parent e391a271bb
commit b162136d87
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 83 additions and 85 deletions

View File

@ -90,15 +90,16 @@
'(delete-file-recursively "lib/")))) '(delete-file-recursively "lib/"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f ; no check target (list
#:modules ((guix build gnu-build-system) #:tests? #f ; no check target
#:modules '((guix build gnu-build-system)
(guix build utils) (guix build utils)
(srfi srfi-1) (srfi srfi-1)
(srfi srfi-26) (srfi srfi-26)
(ice-9 match) (ice-9 match)
(ice-9 regex)) (ice-9 regex))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'patch-paths (add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; prepare ChibiOS ;; prepare ChibiOS
@ -144,8 +145,7 @@
;; Hardcode path to "dfu-util" ;; Hardcode path to "dfu-util"
(substitute* "platform_linux/upload_fw_dfu.sh" (substitute* "platform_linux/upload_fw_dfu.sh"
(("-f \"\\$\\{platformdir\\}/bin/dfu-util\"") "-z \"\"") (("-f \"\\$\\{platformdir\\}/bin/dfu-util\"") "-z \"\"")
(("\\./dfu-util") (which "dfu-util"))) (("\\./dfu-util") (which "dfu-util")))))
#t))
(delete 'configure) (delete 'configure)
(replace 'build (replace 'build
;; Build Axoloti firmware with cross-compiler ;; Build Axoloti firmware with cross-compiler
@ -154,8 +154,7 @@
(invoke "sh" "compile_firmware.sh")))) (invoke "sh" "compile_firmware.sh"))))
(replace 'install (replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((share (string-append #$output "/share/axoloti/"))
(share (string-append out "/share/axoloti/"))
(doc (string-append share "doc")) (doc (string-append share "doc"))
(dir (getcwd)) (dir (getcwd))
(pats '("/doc/[^/]+$" (pats '("/doc/[^/]+$"
@ -185,8 +184,7 @@
#f #f
(string-match dir (dirname file)) (string-match dir (dirname file))
'pre 'post)))) 'pre 'post))))
files) files)))))))
#t))))))
(inputs (inputs
`(("chibios" `(("chibios"
,(origin ,(origin