diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2023-02-12 23:49:57 +0000 |
|---|---|---|
| committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-02-20 14:00:39 +0100 |
| commit | ed00a514e5a12912e8731f12c0bb710185f35655 (patch) | |
| tree | 925bce01d46e7ae23db6f5cf53302d2313b481ae /gnu | |
| parent | 5204f2edf45174673fe8fd912aad7cc50a5747c7 (diff) | |
gnu: python-capablerobot-usbhub: Update to 0.5.0.
* gnu/packages/libusb.scm (python-capablerobot-usbhub): Fix build and update to 0.5.0.
[source]: Use Git checkout which allows to pass build the package.
[build-system]: Use PYPROJECT-BUILD-SYSTEM.
[arguments]{tests}: Disable them as not provided.
[phases]use-poetry-core}: New phase.
[phases]{install-udev-rules}: Remove trailing #T from lambda.
[native-inputs]: Add PYTHON-POETRY-CORE.
[propagated-inputs]: Replace PYTHON-PYYAML-7 and PYTHON-PYYAML-5 by
PYTHON-CLICK and PYTHON-PYYAML.
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/libusb.scm | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index d46f1f8cc2e..468f7b1753f 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | ;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com> | 12 | ;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com> |
| 13 | ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> | 13 | ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> |
| 14 | ;;; Copyright © 2022 Jacob Hrbek <kreyren@rixotstudio.cz> | 14 | ;;; Copyright © 2022 Jacob Hrbek <kreyren@rixotstudio.cz> |
| 15 | ;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com> | ||
| 15 | ;;; | 16 | ;;; |
| 16 | ;;; This file is part of GNU Guix. | 17 | ;;; This file is part of GNU Guix. |
| 17 | ;;; | 18 | ;;; |
| @@ -40,6 +41,7 @@ | |||
| 40 | #:use-module (guix build-system cmake) | 41 | #:use-module (guix build-system cmake) |
| 41 | #:use-module (guix build-system gnu) | 42 | #:use-module (guix build-system gnu) |
| 42 | #:use-module (guix build-system glib-or-gtk) | 43 | #:use-module (guix build-system glib-or-gtk) |
| 44 | #:use-module (guix build-system pyproject) | ||
| 43 | #:use-module (guix build-system python) | 45 | #:use-module (guix build-system python) |
| 44 | #:use-module (gnu packages autotools) | 46 | #:use-module (gnu packages autotools) |
| 45 | #:use-module (gnu packages compression) | 47 | #:use-module (gnu packages compression) |
| @@ -51,6 +53,7 @@ | |||
| 51 | #:use-module (gnu packages mp3) | 53 | #:use-module (gnu packages mp3) |
| 52 | #:use-module (gnu packages pkg-config) | 54 | #:use-module (gnu packages pkg-config) |
| 53 | #:use-module (gnu packages python) | 55 | #:use-module (gnu packages python) |
| 56 | #:use-module (gnu packages python-build) | ||
| 54 | #:use-module (gnu packages python-xyz) | 57 | #:use-module (gnu packages python-xyz) |
| 55 | #:use-module (gnu packages readline) | 58 | #:use-module (gnu packages readline) |
| 56 | #:use-module (gnu packages tls) | 59 | #:use-module (gnu packages tls) |
| @@ -310,18 +313,28 @@ wrapper for accessing libusb-1.0.") | |||
| 310 | (define-public python-capablerobot-usbhub | 313 | (define-public python-capablerobot-usbhub |
| 311 | (package | 314 | (package |
| 312 | (name "python-capablerobot-usbhub") | 315 | (name "python-capablerobot-usbhub") |
| 313 | (version "0.2.7") | 316 | (version "0.5.0") |
| 314 | (source | 317 | (source |
| 315 | (origin | 318 | (origin |
| 316 | (method url-fetch) | 319 | ;; PyPI tarball fails to build. |
| 317 | (uri (pypi-uri "capablerobot_usbhub" version)) | 320 | (method git-fetch) |
| 321 | (uri (git-reference | ||
| 322 | (url "https://github.com/CapableRobot/CapableRobot_USBHub_Driver") | ||
| 323 | (commit (string-append "v" version)))) | ||
| 324 | (file-name (git-file-name name version)) | ||
| 318 | (sha256 | 325 | (sha256 |
| 319 | (base32 | 326 | (base32 "1nfd12612z9a9hby5dxg7lfqw5jcv3wcyqqagbg5izragni646mc")))) |
| 320 | "1priic4iq2vn1rc711kzxwhxrwa508rkxrr193qdz2lw26kdhvix")))) | 327 | (build-system pyproject-build-system) |
| 321 | (build-system python-build-system) | ||
| 322 | (arguments | 328 | (arguments |
| 323 | `(#:phases | 329 | `(#:tests? #f ; No tests provided. |
| 330 | #:phases | ||
| 324 | (modify-phases %standard-phases | 331 | (modify-phases %standard-phases |
| 332 | (add-after 'unpack 'use-poetry-core | ||
| 333 | (lambda _ | ||
| 334 | ;; Patch to use the core poetry API. | ||
| 335 | (substitute* "pyproject.toml" | ||
| 336 | (("poetry.masonry.api") | ||
| 337 | "poetry.core.masonry.api")))) | ||
| 325 | (add-after 'install 'install-udev-rules | 338 | (add-after 'install 'install-udev-rules |
| 326 | (lambda* (#:key outputs #:allow-other-keys) | 339 | (lambda* (#:key outputs #:allow-other-keys) |
| 327 | (let ((out (assoc-ref outputs "out"))) | 340 | (let ((out (assoc-ref outputs "out"))) |
| @@ -329,10 +342,11 @@ wrapper for accessing libusb-1.0.") | |||
| 329 | (copy-file "50-capablerobot-usbhub.rules" | 342 | (copy-file "50-capablerobot-usbhub.rules" |
| 330 | (string-append out | 343 | (string-append out |
| 331 | "/lib/udev/rules.d/" | 344 | "/lib/udev/rules.d/" |
| 332 | "50-capablerobot-usbhub.rules")) | 345 | "50-capablerobot-usbhub.rules")))))))) |
| 333 | #t)))))) | 346 | (native-inputs |
| 347 | (list python-poetry-core)) | ||
| 334 | (propagated-inputs | 348 | (propagated-inputs |
| 335 | (list python-click python-construct python-pyusb python-pyyaml)) | 349 | (list python-click-7 python-construct python-pyusb python-pyyaml-5)) |
| 336 | (home-page | 350 | (home-page |
| 337 | "https://github.com/CapableRobot/CapableRobot_USBHub_Driver") | 351 | "https://github.com/CapableRobot/CapableRobot_USBHub_Driver") |
| 338 | (synopsis | 352 | (synopsis |
