mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-28 07:12:30 -05:00
gnu: micropython: Use G-expressions.
* gnu/packages/python.scm (micropython)[arguments]: Rewrite as G-expressions.
This commit is contained in:
parent
494a34410e
commit
9769867272
1 changed files with 24 additions and 22 deletions
|
@ -692,28 +692,30 @@ (define-public micropython
|
|||
'("libffi" "lwip" "stm32lib" "nrfx")))))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'build 'build-mpy-cross
|
||||
(lambda* (#:key make-flags #:allow-other-keys)
|
||||
(with-directory-excursion "mpy-cross"
|
||||
(apply invoke "make" make-flags))))
|
||||
(add-after 'build-mpy-cross 'prepare-build
|
||||
(lambda _
|
||||
(chdir "ports/unix")
|
||||
;; see: https://github.com/micropython/micropython/pull/4246
|
||||
(substitute* "Makefile"
|
||||
(("-Os") "-Os -ffp-contract=off"))))
|
||||
(replace 'install-license-files
|
||||
;; We don't build in the root directory so the file isn't found.
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(dest (string-append out "/share/doc/" ,name "-" ,version "/")))
|
||||
(install-file "../../LICENSE" dest))))
|
||||
(delete 'configure)) ; no configure
|
||||
#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||
"V=1")
|
||||
#:test-target "test"))
|
||||
(list #:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-before 'build 'build-mpy-cross
|
||||
(lambda* (#:key make-flags #:allow-other-keys)
|
||||
(with-directory-excursion "mpy-cross"
|
||||
(apply invoke "make" make-flags))))
|
||||
(add-after 'build-mpy-cross 'prepare-build
|
||||
(lambda _
|
||||
(chdir "ports/unix")
|
||||
;; see: https://github.com/micropython/micropython/pull/4246
|
||||
(substitute* "Makefile"
|
||||
(("-Os") "-Os -ffp-contract=off"))))
|
||||
(replace 'install-license-files
|
||||
;; We don't build in the root directory so the file isn't found.
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(doc (string-append out "/share/doc/"
|
||||
#$name "-" #$version "/")))
|
||||
(install-file "../../LICENSE" doc))))
|
||||
(delete 'configure)) ; no configure
|
||||
#:make-flags
|
||||
#~(list (string-append "PREFIX=" #$output)
|
||||
"V=1")
|
||||
#:test-target "test"))
|
||||
(native-inputs (list pkg-config python-wrapper))
|
||||
(inputs
|
||||
(list libffi))
|
||||
|
|
Loading…
Reference in a new issue