From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:55840) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQ0Yy-0000zV-K0 for guix-patches@gnu.org; Sat, 18 Apr 2020 23:24:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQ0Yy-0005YG-2t for guix-patches@gnu.org; Sat, 18 Apr 2020 23:24:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jQ0Ys-0005UV-1l for guix-patches@gnu.org; Sat, 18 Apr 2020 23:24:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jQ0Yr-0005ac-UA for guix-patches@gnu.org; Sat, 18 Apr 2020 23:24:01 -0400 Subject: [bug#40666] [PATCH 2/2] gnu: Add trezord-udev-rules. Resent-Message-ID: References: <20200416161713.3466-1-mjbecze@riseup.net> <20200416162044.3548-1-mjbecze@riseup.net> <87a739akal.fsf@gnu.org> From: Martin Becze Message-ID: Date: Sat, 18 Apr 2020 22:23:16 -0500 MIME-Version: 1.0 In-Reply-To: <87a739akal.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------9E16C45D919638D06492F794" Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 40666@debbugs.gnu.org This is a multi-part message in MIME format. --------------9E16C45D919638D06492F794 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sure thing! I here is the updated patch. Note I still need to add a new package, since the udev rules are in a separate repo. On 4/17/20 4:12 PM, Ludovic Courtès wrote: > Hi Martin, > > Martin Becze 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’. > --------------9E16C45D919638D06492F794 Content-Type: text/x-patch; charset=UTF-8; name="v2-0001-gnu-Add-trezor-common.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="v2-0001-gnu-Add-trezor-common.patch" =46rom d5f984dcb2d77f281f0acf4b418276a801235d91 Mon Sep 17 00:00:00 2001 From: Martin Becze Date: Wed, 15 Apr 2020 19:37:53 -0500 Subject: [PATCH v2] gnu: Add trezor-common * gnu/packages/finance.scm (trezor-common): New variable. (trezord): Install udev rules from trezor-common. --- gnu/packages/finance.scm | 50 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index ee254c3a9f..b1f6ebcf60 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,35 @@ information.") (home-page "https://grisbi.org") (license license:gpl2+))) =20 +(define-public trezor-common + (let ((commit "bff7fdfe436c727982cc553bdfb29a9021b423b0") + (revision "0")) + (package + (name "trezor-common") + (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 + ;; currently we only have use for the udev rules + '(("./udev/51-trezor.rules" "lib/udev/rules.d/")))) + (home-page "https://github.com/trezor/trezor-common") + (synopsis "This project contains files shared among Trezor proje= cts.") + (description + "This project contains files shared among Trezor projects, +including the udev rules for trezord") + (properties '((hidden? . #t))) + (license license:lgpl3+)))) + (define-public trezord (package (name "trezord") @@ -1173,15 +1203,29 @@ information.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/trezor/trezord-go.git") - (commit (string-append "v" version)))) + (url "https://github.com/trezor/trezord-go.git") + (commit (string-append "v" version)))) (sha256 (base32 "1ks1fa0027s3xp0z6qp0dxmayvrb4dwwscfhbx7da0khp153f2cp")) (file-name (git-file-name name version)))) (build-system go-build-system) + (native-inputs + `(("trezor-common" ,trezor-common))) (arguments - '(#:import-path "github.com/trezor/trezord-go")) + '(#:import-path "github.com/trezor/trezord-go" + #:phases + (modify-phases %standard-phases + (add-before 'install 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (common (assoc-ref inputs "trezor-common")) + (rule-path "/lib/udev/rules.d/51-trezor.rules") + (input-path (string-append common rule-path)) + (output-path (string-append out rule-path))) + + ;; install the udev rules + (install-file input-path output-path))))))) (home-page "https://trezor.io") (synopsis "Trezor Communication Daemon aka Trezor Bridge (written in= Go)") (description "This allows a Trezor hardware wallet to communicate to= the --=20 2.26.1 --------------9E16C45D919638D06492F794--