GNU bug report logs - #72635
[PATCH] gnu: Add python-usbrelay.

Previous Next

Package: guix-patches;

Reported by: Evgeny Pisemsky <mail <at> pisemsky.site>

Date: Thu, 15 Aug 2024 07:17:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 72635 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: 72635 <at> debbugs.gnu.org
Subject: [PATCH v1] gnu: Add python-usbrelay.
Date: Fri, 28 Feb 2025 12:42:24 +0300
* gnu/packages/hardware.scm (python-usbrelay): New variable.

Change-Id: Icc389604a9bbc8f91fd7b00c1f5cebe3faac3e09
---
 gnu/packages/hardware.scm | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 13850b8e12..b8a0acf1ff 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2020 Brice Waegeneire <brice <at> waegenei.re>
-;;; Copyright © 2021, 2023, 2024 Evgeny Pisemsky <mail <at> pisemsky.site>
+;;; Copyright © 2021, 2023-2025 Evgeny Pisemsky <mail <at> pisemsky.site>
 ;;; Copyright © 2021 Léo Le Bouter <lle-bout <at> zaclys.net>
 ;;; Copyright © 2021 Denis Carikli <GNUtoo <at> cyberdimension.org>
 ;;; Copyright © 2021, 2022 Petr Hodina <phodina <at> protonmail.com>
@@ -73,6 +73,7 @@ (define-module (gnu packages hardware)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages lxqt)
+  #:use-module (gnu packages messaging)
   #:use-module (gnu packages mtools)
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages ncurses)
@@ -86,6 +87,7 @@ (define-module (gnu packages hardware)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
@@ -1616,3 +1618,26 @@ (define-public usbrelay
 HID compatible USB relay modules available with different number of
 output relays.")
     (license license:gpl2+)))
+
+(define-public python-usbrelay
+  (package
+    (inherit usbrelay)
+    (name "python-usbrelay")
+    (build-system pyproject-build-system)
+    (native-inputs (list python-setuptools python-wheel))
+    (inputs (list usbrelay))
+    (propagated-inputs (list python-paho-mqtt))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'install-daemon
+            (lambda _
+              (install-file "usbrelayd.8"
+                            (string-append #$output "/share/man/man8"))
+              (install-file "usbrelayd"
+                            (string-append #$output "/sbin"))
+              (chmod (string-append #$output "/sbin/usbrelayd") #o555)))
+          (add-after 'install-daemon 'chdir
+            (lambda _
+              (chdir "usbrelay_py"))))))))

base-commit: a76708a872e65230931f3c5c3b079d0a39d5cb84
-- 
2.48.1





This bug report was last modified 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.