diff options
| author | Tobias Geerinckx-Rice <me@tobias.gr> | 2022-05-29 02:00:00 +0200 |
|---|---|---|
| committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2022-05-29 02:00:17 +0200 |
| commit | 9769867272b6120de5ff846e48211a51838aaa96 (patch) | |
| tree | 3202f7d2050519897e18977b0bbf138af84e3c7f /gnu/packages/python.scm | |
| parent | 494a34410ebf94f8461f435d15c3baadf14c2ec6 (diff) | |
gnu: micropython: Use G-expressions.
* gnu/packages/python.scm (micropython)[arguments]:
Rewrite as G-expressions.
Diffstat (limited to 'gnu/packages/python.scm')
| -rw-r--r-- | gnu/packages/python.scm | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 4676409eec6..1727024bfe8 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm | |||
| @@ -692,28 +692,30 @@ To function properly, this package should not be installed together with the | |||
| 692 | '("libffi" "lwip" "stm32lib" "nrfx"))))))) | 692 | '("libffi" "lwip" "stm32lib" "nrfx"))))))) |
| 693 | (build-system gnu-build-system) | 693 | (build-system gnu-build-system) |
| 694 | (arguments | 694 | (arguments |
| 695 | `(#:phases | 695 | (list #:phases |
| 696 | (modify-phases %standard-phases | 696 | #~(modify-phases %standard-phases |
| 697 | (add-before 'build 'build-mpy-cross | 697 | (add-before 'build 'build-mpy-cross |
| 698 | (lambda* (#:key make-flags #:allow-other-keys) | 698 | (lambda* (#:key make-flags #:allow-other-keys) |
| 699 | (with-directory-excursion "mpy-cross" | 699 | (with-directory-excursion "mpy-cross" |
| 700 | (apply invoke "make" make-flags)))) | 700 | (apply invoke "make" make-flags)))) |
| 701 | (add-after 'build-mpy-cross 'prepare-build | 701 | (add-after 'build-mpy-cross 'prepare-build |
| 702 | (lambda _ | 702 | (lambda _ |
| 703 | (chdir "ports/unix") | 703 | (chdir "ports/unix") |
| 704 | ;; see: https://github.com/micropython/micropython/pull/4246 | 704 | ;; see: https://github.com/micropython/micropython/pull/4246 |
| 705 | (substitute* "Makefile" | 705 | (substitute* "Makefile" |
| 706 | (("-Os") "-Os -ffp-contract=off")))) | 706 | (("-Os") "-Os -ffp-contract=off")))) |
| 707 | (replace 'install-license-files | 707 | (replace 'install-license-files |
| 708 | ;; We don't build in the root directory so the file isn't found. | 708 | ;; We don't build in the root directory so the file isn't found. |
| 709 | (lambda* (#:key outputs #:allow-other-keys) | 709 | (lambda* (#:key outputs #:allow-other-keys) |
| 710 | (let* ((out (assoc-ref outputs "out")) | 710 | (let* ((out (assoc-ref outputs "out")) |
| 711 | (dest (string-append out "/share/doc/" ,name "-" ,version "/"))) | 711 | (doc (string-append out "/share/doc/" |
| 712 | (install-file "../../LICENSE" dest)))) | 712 | #$name "-" #$version "/"))) |
| 713 | (delete 'configure)) ; no configure | 713 | (install-file "../../LICENSE" doc)))) |
| 714 | #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | 714 | (delete 'configure)) ; no configure |
| 715 | "V=1") | 715 | #:make-flags |
| 716 | #:test-target "test")) | 716 | #~(list (string-append "PREFIX=" #$output) |
| 717 | "V=1") | ||
| 718 | #:test-target "test")) | ||
| 717 | (native-inputs (list pkg-config python-wrapper)) | 719 | (native-inputs (list pkg-config python-wrapper)) |
| 718 | (inputs | 720 | (inputs |
| 719 | (list libffi)) | 721 | (list libffi)) |
