unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Fredrik Salomonsson <plattfot@posteo.net>
To: 45190@debbugs.gnu.org
Cc: Fredrik Salomonsson <plattfot@posteo.net>
Subject: [bug#45190] [PATCH 1/1] gnu: Add pinentry-rofi.
Date: Fri, 11 Dec 2020 18:31:03 -0800	[thread overview]
Message-ID: <20201212023103.79992-1-plattfot@posteo.net> (raw)
In-Reply-To: <20201212021954.78983-1-plattfot@posteo.net>

* gnu/packages/gnupg.scm (pinentry-rofi): New variable.
---
 gnu/packages/gnupg.scm | 81 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 3620efea3a..dad6a1de81 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Fredrik Salomonsson <plattfot@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -67,6 +68,7 @@
   #:use-module (gnu packages tor)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xorg)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -892,6 +894,85 @@ passphrase when @code{gpg} is run and needs it.")))
 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
 passphrase when @code{gpg} is run and needs it.")))
 
+(define-public pinentry-rofi
+  (package
+  (name "pinentry-rofi")
+  (version "2.0.1")
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/plattfot/pinentry-rofi/")
+                  (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32 "044bnldz7k74s873jwsjgff176l1jsvpbaka7d1wcj8b5pwqv2av"))))
+  (build-system gnu-build-system)
+  (arguments
+    `(#:strip-binaries? #f ;; Has no binaries and the strip phase is failing
+      #:modules
+      ((ice-9 match)
+       (ice-9 ftw)
+       ,@%gnu-build-system-modules)
+      #:phases
+      (modify-phases
+        %standard-phases
+        (add-after
+          'install
+          'hall-wrap-binaries
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let* ((compiled-dir
+                     (lambda (out version)
+                       (string-append out "/lib/guile/" version "/site-ccache")))
+                   (uncompiled-dir
+                     (lambda (out version)
+                       (string-append
+                         out
+                         "/share/guile/site"
+                         (if (string-null? version) "" "/")
+                         version)))
+                   (dep-path
+                     (lambda (env modules path)
+                       (list env
+                             ":"
+                             'prefix
+                             (cons modules
+                                   (map (lambda (input)
+                                          (string-append
+                                            (assoc-ref inputs input)
+                                            path))
+                                        ,''("rofi"))))))
+                   (out (assoc-ref outputs "out"))
+                   (bin (string-append out "/bin/"))
+                   (site (uncompiled-dir out "")))
+              (match (scandir site)
+                     (("." ".." version)
+                      (for-each
+                        (lambda (file)
+                          (wrap-program
+                            (string-append bin file)
+                            (dep-path
+                              "GUILE_LOAD_PATH"
+                              (uncompiled-dir out version)
+                              (uncompiled-dir "" version))
+                            (dep-path
+                              "GUILE_LOAD_COMPILED_PATH"
+                              (compiled-dir out version)
+                              (compiled-dir "" version))))
+                        ,''("pinentry-rofi"))
+                      #t))))))))
+  (native-inputs
+    `(("autoconf" ,autoconf)
+      ("automake" ,automake)
+      ("pkg-config" ,pkg-config)
+      ("texinfo" ,texinfo)))
+  (inputs `(("guile" ,guile-3.0)))
+  (propagated-inputs `(("rofi" ,rofi)))
+  (synopsis "Rofi GUI for GnuPG's passphrase input")
+  (description "Simple pinentry GUI using rofi that allows users to enter a
+passphrase when required by @code{gpg} or other software.")
+  (home-page "https://github.com/plattfot/pinentry-rofi/")
+  (license license:gpl3+)))
+
 (define-public pinentry
   (package (inherit pinentry-gtk2)
     (name "pinentry")))
-- 
2.29.2





  reply	other threads:[~2020-12-12  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-12  2:19 [bug#45190] [PATCH 0/1] Add pinentry-rofi Fredrik Salomonsson
2020-12-12  2:31 ` Fredrik Salomonsson [this message]
2021-01-03 21:18   ` [bug#45190] [PATCH 1/1] gnu: " Ludovic Courtès
2021-01-09  2:14     ` Fredrik Salomonsson
2021-01-13 15:24       ` [bug#45190] [PATCH 0/1] " Ludovic Courtès
2021-01-09  1:47 ` [bug#45190] [PATCH v2] gnu: " Fredrik Salomonsson
2021-01-13 15:26   ` bug#45190: [PATCH 0/1] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201212023103.79992-1-plattfot@posteo.net \
    --to=plattfot@posteo.net \
    --cc=45190@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).