From patchwork Thu Aug 15 07:15:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Pisemsky X-Patchwork-Id: 30075 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E945B27BBE2; Thu, 15 Aug 2024 08:16:48 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8769C27BBE9 for ; Thu, 15 Aug 2024 08:16:46 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seUii-0005lw-OD; Thu, 15 Aug 2024 03:16:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seUig-0005ll-Qp for guix-patches@gnu.org; Thu, 15 Aug 2024 03:16:27 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seUig-0002km-Gk for guix-patches@gnu.org; Thu, 15 Aug 2024 03:16:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=PAwQJDyNBF6rneLf6Uci/k4tsP2Rl3A3f0zVSoY3/1k=; b=EUSr0R4JWNGVSAjQm4FhyM4f8nFMuVI5BJvLab+JhiGNT+IqbJWYgzN0xCcq+toIjVKOKijjbOVo8KMIDis6i3f6y1U/9LbL+QZeH/4ukcibSMxIAmsdfKkc5p3fJoPexA8aOcI62mG8nqZyIaGgvq9Re/PxeevU7opA4QLSRhuOA/T0DwVgU48+xUdUljbvhacgvD/R0B2WfeFCi3wrsbSXuQq979Bb8pKq8DI+jiQQBU4gURz7OCk6r2osuEpoYppD+rESn9geJJEsrCa7yRPzp+wdmIgeFUenSxzjhmfePCCRX0umCXmx7PPm51SHxH+Jd9bdrccd0eUw0kRLag==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1seUjF-0003ca-Sj for guix-patches@gnu.org; Thu, 15 Aug 2024 03:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72635] [PATCH] gnu: Add python-usbrelay. Resent-From: Evgeny Pisemsky Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Aug 2024 07:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72635 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72635@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172370618913848 (code B ref -1); Thu, 15 Aug 2024 07:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Aug 2024 07:16:29 +0000 Received: from localhost ([127.0.0.1]:48243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seUii-0003bG-Tk for submit@debbugs.gnu.org; Thu, 15 Aug 2024 03:16:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:36958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seUig-0003b8-96 for submit@debbugs.gnu.org; Thu, 15 Aug 2024 03:16:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seUi4-0005jM-E9 for guix-patches@gnu.org; Thu, 15 Aug 2024 03:15:49 -0400 Received: from roxy-shared.hosting.energy ([137.74.182.160] helo=roxy.hosting.energy) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seUhz-0002dT-6q for guix-patches@gnu.org; Thu, 15 Aug 2024 03:15:48 -0400 Received: from [45.137.112.34] (helo=laptop) by roxy.hosting.energy with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1seUhx-000000003Rs-1IDW for guix-patches@gnu.org; Thu, 15 Aug 2024 10:15:41 +0300 From: Evgeny Pisemsky Date: Thu, 15 Aug 2024 10:15:38 +0300 Message-ID: <87sev6i7dx.fsf@pisemsky.site> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Disposition: inline; filename=0001-gnu-Add-python-usbrelay.patch X-Scanned-By: ClamAV 0.101.4; Thu, 15 Aug 2024 10:15:41 +0300 Received-SPF: pass client-ip=137.74.182.160; envelope-from=mail@pisemsky.site; helo=roxy.hosting.energy X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From 7848f0db92bee6fa523661d4599a294df1668b0c Mon Sep 17 00:00:00 2001 Message-ID: <7848f0db92bee6fa523661d4599a294df1668b0c.1723705343.git.mail@pisemsky.site> From: Evgeny Pisemsky Date: Thu, 15 Aug 2024 10:00:00 +0300 Subject: [PATCH] gnu: Add python-usbrelay. * gnu/packages/hardware.scm (python-usbrelay): New variable. Change-Id: Icc389604a9bbc8f91fd7b00c1f5cebe3faac3e09 --- gnu/packages/hardware.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index d8530f8705..5c82f02255 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -70,6 +70,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) @@ -1622,3 +1623,32 @@ (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 python-build-system) + (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-and-set-version + (lambda _ + (chdir "usbrelay_py") + (substitute* "setup.py" + ((" version = .*") + (string-append " version = '" + #$(package-version usbrelay) "',\n"))) + (substitute* "src/__init__.py" + (("__version__ = .*") + (string-append "__version__ = \"" + #$(package-version usbrelay) "\"\n")))))))))) base-commit: 936928fe38946a7496273e636ca8888914d100a9 -- 2.45.2