gnu: micropython: Use G-expressions.

* gnu/packages/python.scm (micropython)[arguments]:
Rewrite as G-expressions.
This commit is contained in:
Tobias Geerinckx-Rice 2022-05-29 02:00:00 +02:00
parent 494a34410e
commit 9769867272
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -692,28 +692,30 @@ To function properly, this package should not be installed together with the
'("libffi" "lwip" "stm32lib" "nrfx"))))))) '("libffi" "lwip" "stm32lib" "nrfx")))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (list #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'build 'build-mpy-cross (add-before 'build 'build-mpy-cross
(lambda* (#:key make-flags #:allow-other-keys) (lambda* (#:key make-flags #:allow-other-keys)
(with-directory-excursion "mpy-cross" (with-directory-excursion "mpy-cross"
(apply invoke "make" make-flags)))) (apply invoke "make" make-flags))))
(add-after 'build-mpy-cross 'prepare-build (add-after 'build-mpy-cross 'prepare-build
(lambda _ (lambda _
(chdir "ports/unix") (chdir "ports/unix")
;; see: https://github.com/micropython/micropython/pull/4246 ;; see: https://github.com/micropython/micropython/pull/4246
(substitute* "Makefile" (substitute* "Makefile"
(("-Os") "-Os -ffp-contract=off")))) (("-Os") "-Os -ffp-contract=off"))))
(replace 'install-license-files (replace 'install-license-files
;; We don't build in the root directory so the file isn't found. ;; We don't build in the root directory so the file isn't found.
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(dest (string-append out "/share/doc/" ,name "-" ,version "/"))) (doc (string-append out "/share/doc/"
(install-file "../../LICENSE" dest)))) #$name "-" #$version "/")))
(delete 'configure)) ; no configure (install-file "../../LICENSE" doc))))
#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) (delete 'configure)) ; no configure
"V=1") #:make-flags
#:test-target "test")) #~(list (string-append "PREFIX=" #$output)
"V=1")
#:test-target "test"))
(native-inputs (list pkg-config python-wrapper)) (native-inputs (list pkg-config python-wrapper))
(inputs (inputs
(list libffi)) (list libffi))