diff mbox series

[bug#40666,2/2] gnu: Add trezord-udev-rules.

Message ID 20200416162044.3548-1-mjbecze@riseup.net
State Accepted
Headers show
Series [bug#40666,1/2] gnu: trezord: Update to 2.0.29. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Martin Becze April 16, 2020, 4:20 p.m. UTC
* gnu/packages/finance.scm (trezord-udev-rules): New variable.

---
 gnu/packages/finance.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Ludovic Courtès April 17, 2020, 9:12 p.m. UTC | #1
Hi Martin,

Martin Becze <mjbecze@riseup.net> skribis:

> * gnu/packages/finance.scm (trezord-udev-rules): New variable.

I think it would be best to add a phase to ‘trezord’ that installs its
udev rules (it’s quite common for packages to include udev rules.)

WDYT?

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 0c05530a31..66ca35483c 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -41,6 +41,7 @@ 
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
   #:use-module (guix build-system glib-or-gtk)
@@ -1165,6 +1166,33 @@  information.")
     (home-page "https://grisbi.org")
     (license license:gpl2+)))
 
+(define-public trezord-udev-rules
+  (let ((commit "bff7fdfe436c727982cc553bdfb29a9021b423b0")
+        (revision "0"))
+      (package
+        (name "trezord-udev-rules")
+        (version (git-version "0.0.0" revision commit))
+        (source
+         (origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/trezor/trezor-common.git")
+                 (commit commit)))
+           (sha256
+            (base32
+             "14mrirrn68if7ja6qdk9qlxs1hv0f21vrxy5ncnms0gx9iwakp2l"))
+           (file-name (git-file-name name version))))
+        (build-system copy-build-system)
+        (arguments
+         '(#:install-plan
+           '(("./udev/51-trezor.rules" "lib/udev/rules.d/"))))
+        (home-page "https://github.com/trezor/trezor-common")
+        (synopsis "The udev rules for trezord.")
+        (description
+         "This contains the udev rules for trezord. This will let a user run
+trezord as a regular user instead of needing to it run as root.")
+        (license license:lgpl3+))))
+
 (define-public trezord
   (package
     (name "trezord")