Subject: [PATCH 2/2] gnu: Add pinentry-bemenu

From: Nikita Domnitskii <[email-masked]>
Date: Mon, 28 Jun 2021 12:07:27 -0000

From: Nikita Domnitskii <[email-masked]>

---
 gnu/packages/gnupg.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 9cc94dddb6..4223883173 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2018 Björn Höfling <[email-masked]>
 ;;; Copyright © 2019 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2020 Fredrik Salomonsson <[email-masked]>
+;;; Copyright © 2021 Nikita Domnitskii <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -70,6 +71,8 @@
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages popt)
+  #:use-module (gnu packages xdisorg)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -77,6 +80,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system meson)
   #:use-module (srfi srfi-1))
 
 (define-public libgpg-error
@@ -946,6 +950,32 @@ with @code{rofi-pass} a good front end for @code{password-store}.")
     (home-page "https://github.com/plattfot/pinentry-rofi/")
     (license license:gpl3+)))
 
+(define-public pinentry-bemenu
+  (package
+    (name "pinentry-bemenu")
+    (version "0.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/t-8ch/pinentry-bemenu")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1faxaydhc9lr97b2r3sylcy320bn54g4a5p727y3227mz3gg1mn1"))))
+    (build-system meson-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("bemenu" ,bemenu)
+       ("libassuan" ,libassuan)
+       ("libgpg-error" ,libgpg-error)
+       ("popt" ,popt)))
+    (synopsis "Pinentry implementation based on @code{bemenu}")
+    (description "Pinentry implementation based on @code{bemenu}")
+    (license license:gpl3)
+    (home-page "https://github.com/t-8ch/pinentry-bemenu")))
+
 (define-public pinentry
   (package (inherit pinentry-gtk2)
     (name "pinentry")))
-- 
2.32.0