GNU bug report logs - #74315
[PATCH 0/1] gnu: Add ptouch-print.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Fredrik Salomonsson <plattfot@HIDDEN>; Keywords: patch; dated Tue, 12 Nov 2024 03:20:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 74315 <at> debbugs.gnu.org:


Received: (at 74315) by debbugs.gnu.org; 12 Nov 2024 03:54:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 11 22:54:37 2024
Received: from localhost ([127.0.0.1]:59978 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tAhzB-0005mk-Bu
	for submit <at> debbugs.gnu.org; Mon, 11 Nov 2024 22:54:37 -0500
Received: from mout01.posteo.de ([185.67.36.65]:41525)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <plattfot@HIDDEN>) id 1tAhz8-0005mV-7Z
 for 74315 <at> debbugs.gnu.org; Mon, 11 Nov 2024 22:54:35 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id D7517240027
 for <74315 <at> debbugs.gnu.org>; Tue, 12 Nov 2024 04:54:26 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1731383667; bh=ElsCClMRP8sz4kbWhqb7KVi8vOUZpYw41d/Qgr0sD8s=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:
 Content-Transfer-Encoding:From;
 b=VMjHGGASCI47HG5HGhzfy/Scx6xpGwAGWy4ftuPGLoF0Wd6uxyTs8I56o9gOqNRoi
 Q9vEOPgkkURbXnvBBGU0aaRFZP8v+ycr6bFoGlO7HyusdHvlFenCnZAkZ1Knj3BMT8
 PCECl+ffDiq2KuxnRspmgELdGuQjK8gR48kB+uCxOcIwbRUpD/xxFUhqDkRnCqN7ET
 iRccv1D4qzFaLE4Qf1rl39J2FWmGRkPQ59MJ/6erwdpe6ln8/UGQl9A/dU4G6nLFb6
 FibYvrT4UkagAaarRR9ZI/MZIOw985BBW/Slcp4cfVYVYmfw+/QZKenkA7SDbUwEpf
 Uecx0qEdxvKEw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4XnXbj4N1Jz9rxB;
 Tue, 12 Nov 2024 04:54:25 +0100 (CET)
From: Fredrik Salomonsson <plattfot@HIDDEN>
To: 74315 <at> debbugs.gnu.org
Subject: [PATCH 1/1] gnu: Add ptouch-print.
Date: Tue, 12 Nov 2024 03:28:07 +0000
Message-ID: <e78f169b2270122be75a945ef06e7ea7533d6476.1731381092.git.plattfot@HIDDEN>
In-Reply-To: <cover.1731381092.git.plattfot@HIDDEN>
References: <cover.1731381092.git.plattfot@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74315
Cc: Fredrik Salomonsson <plattfot@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/packages/printers.scm (ptouch-print): New variable.

Change-Id: I2ab2a80b80932af8566f6c5879e63e7b0bced747
---
 gnu/packages/printers.scm | 55 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/printers.scm b/gnu/packages/printers.scm
index 0069494b4d..995af76359 100644
--- a/gnu/packages/printers.scm
+++ b/gnu/packages/printers.scm
@@ -22,14 +22,18 @@ (define-module (gnu packages printers)
   #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages avahi)
+  #:use-module (gnu packages gd)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages golang-xyz)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages man)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages qt))
 
 ;; This is a module for packages related to printer-like devices, but not
@@ -69,6 +73,57 @@ (define-public ipp-usb
 simply relay a TCP connection to USB do not work.")
     (license license:bsd-2)))
 
+(define-public ptouch-print
+  (let ((commit "740b20e150e030aa2e75086d1202064f9c4c4090")
+        (revision "0"))
+    (package
+      (name "ptouch-print")
+      (version (git-version "1.5" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url
+                "https://git.familie-radermacher.ch/linux/ptouch-print.git")
+               (commit commit)))
+         (sha256
+          (base32 "17lw6gyb9hqdzdlypm98bdpnfjn74a3jrdd0rwic63a7072iqnzr"))
+         (file-name (git-file-name name version))))
+      (build-system cmake-build-system)
+      (arguments
+       '(#:tests? #f ;no test target
+         #:phases (modify-phases %standard-phases
+                    (add-before 'configure 'patch-cmakefile
+                      (lambda _
+                        (substitute* "CMakeLists.txt"
+                          ;; Remove the internal override of CMAKE_INSTALL_PREFIX
+                          (("set\\(CMAKE_INSTALL_PREFIX /usr\\)")
+                           "")
+                          ;; Remove hard coded udev install steps, installing it in the
+                          ;; install-udev-rules phase
+                          (("if\\(EXISTS /etc/udev/rules.d\\)
+\tinstall\\(FILES udev/90-usb-ptouch-permissions.rules DESTINATION /etc/udev/rules.d\\)
+\tinstall\\(CODE \"execute_process(COMMAND udevadm control --reload-rules)\"\\)
+endif\\(\\)
+")
+                           "")) #t))
+                    (add-after 'install 'install-udev-rules
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let* ((out (assoc-ref outputs "out"))
+                               (rules (string-append out "/lib/udev/rules.d/")))
+                          (install-file
+                           "../source/udev/90-usb-ptouch-permissions.rules"
+                           rules)))))))
+      (native-inputs (list gd git gettext-minimal libusb pkg-config))
+      (synopsis "CLI tool to print labels on Brother P-Touch printers")
+      (description
+       "A command line tool to print labels on Brother P-Touch
+printers on Linux.  Note that there is no need to install the printer via CUPS, the
+printer is accessed directly via libusb.")
+      (home-page
+       "https://dominic.familie-radermacher.ch/projekte/ptouch-print/")
+      (license license:gpl3))))
+
 (define-public robocut
   (package
     (name "robocut")
-- 
2.46.0





Information forwarded to guix-patches@HIDDEN:
bug#74315; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Nov 2024 03:19:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 11 22:19:09 2024
Received: from localhost ([127.0.0.1]:59909 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tAhQr-00048g-IA
	for submit <at> debbugs.gnu.org; Mon, 11 Nov 2024 22:19:09 -0500
Received: from lists.gnu.org ([209.51.188.17]:45798)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <plattfot@HIDDEN>) id 1tAhQq-00048Y-Hm
 for submit <at> debbugs.gnu.org; Mon, 11 Nov 2024 22:19:09 -0500
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 <plattfot@HIDDEN>)
 id 1tAhQq-0000xi-24
 for guix-patches@HIDDEN; Mon, 11 Nov 2024 22:19:08 -0500
Received: from mout02.posteo.de ([185.67.36.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <plattfot@HIDDEN>)
 id 1tAhQn-0000yU-Ut
 for guix-patches@HIDDEN; Mon, 11 Nov 2024 22:19:07 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id B65F4240101
 for <guix-patches@HIDDEN>; Tue, 12 Nov 2024 04:18:56 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1731381536; bh=yOXWa4peAsvxzPhX/mJEJuDS5CtUmgAG5LqfXLS9x3g=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:
 Content-Transfer-Encoding:From;
 b=dVkry1eZxckNduodX6MuclPng3kwRgkoADCoQn2ebUwH6FxuxGRfd0A24vT4vLtVG
 MRGKCC3b7Uj+m1WodkrebrYzQZzLG1KP34F1l1/1sCM5Z0wqRn3W0J/8NasCC2C1zd
 qDXLaPU0ePid6al8Fynoz8T3chidRF2f5d+bUUJdCWv33Lg0Gg3xP7cCjB784T2bUE
 T/xOgVLzbR41ztMYtgfdurTH/C+IFAYI8RkucNSA71qmquqNx6ccTwR91culZQB+KZ
 giYhHf5m0Yw+3EJDWp7mkfQB1vPNMCEDKCVD9m1MFNk0KYHa0w3G9xLP+oQvsJ96KG
 POoLFxgSdRhJQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4XnWpl6y9zz9rxB;
 Tue, 12 Nov 2024 04:18:55 +0100 (CET)
From: Fredrik Salomonsson <plattfot@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/1] gnu: Add ptouch-print.
Date: Tue, 12 Nov 2024 03:18:50 +0000
Message-ID: <cover.1731381092.git.plattfot@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=185.67.36.66; envelope-from=plattfot@HIDDEN;
 helo=mout02.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Fredrik Salomonsson <plattfot@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi Guix,

Adding a package to be able to print labels with a Brother P-touch printer.  I
tested this with a P700 and it worked fine.  It installs the udev rules that
should allow any user to use this CLI tool without needing sudo.  But I could
not get that to work.  Might be my setup or that Guix System does not properly
support the uaccess tag.  E.g. see the Arch Wiki [0] on what the uaccess tag
is suppose to trigger.

[0] https://wiki.archlinux.org/title/Udev#Allowing_regular_users_to_use_devices

Fredrik Salomonsson (1):
  gnu: Add ptouch-print.

 gnu/packages/printers.scm | 55 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)


base-commit: b790db7589858fc77989b4d1f369c52bca6d6e7c
-- 
2.46.0





Acknowledgement sent to Fredrik Salomonsson <plattfot@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#74315; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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