all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#27791] [PATCH] gnu: Add passmenu
@ 2017-07-22 12:35 Jelle Licht
  2017-07-22 13:00 ` Marius Bakke
  0 siblings, 1 reply; 6+ messages in thread
From: Jelle Licht @ 2017-07-22 12:35 UTC (permalink / raw)
  To: 27791


[-- Attachment #1.1: Type: text/plain, Size: 450 bytes --]

Hello guix,

Attached is a patch to include passmenu, a dmenu interface to the pass
password store.

I was not quite sure how to structure this patch, as it basically installs
and wraps a shell script from the `password-store' sources. We could
instead include it as a separate output of our `password-store' package,
but I already had it like this in my GUIX_PACKAGE_PATH and I was not even
sure if that approach was in general preferable.

- Jelle

[-- Attachment #1.2: Type: text/html, Size: 535 bytes --]

[-- Attachment #2: 0001-gnu-Add-passmenu.patch --]
[-- Type: application/octet-stream, Size: 2618 bytes --]

From 7fec0bd8744d22f55becd36c4635f365de0c676e Mon Sep 17 00:00:00 2001
From: Jelle Licht <jlicht@fsfe.org>
Date: Sat, 22 Jul 2017 14:23:18 +0200
Subject: [PATCH] gnu: Add passmenu.

* gnu/packages/password-utils.scm (passmenu): New variable.
---
 gnu/packages/password-utils.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 08591d108..155e7110a 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -48,6 +48,7 @@
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages suckless)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages version-control)
@@ -446,3 +447,40 @@ use pass, the standard unix password manager, as the credential backend for
 your git repositories.  This is achieved by explicitly defining mappings
 between hosts and entries in the password store.")
     (license license:lgpl3+)))
+
+(define-public passmenu
+  (package
+    (inherit password-store)
+    (name "passmenu")
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (copy-file "contrib/dmenu/passmenu"
+                          (string-append bin "/passmenu"))
+               #t)))
+         (add-after 'install 'wrap-path
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (path (map (lambda (pkg)
+                                (string-append (assoc-ref inputs pkg) "/bin"))
+                              '("password-store" "dmenu" "xdotool"))))
+               (wrap-program (string-append out "/bin/passmenu")
+                 `("PATH" ":" prefix (,(string-join path ":"))))
+               #t))))
+       #:tests? #f))
+    (inputs
+     `(("password-store" ,password-store)
+       ("xdotool" ,xdotool)
+       ("dmenu" ,dmenu)))
+    (synopsis "Simple dmenu interface to the pass password manager")
+    (description "passmenu allows you to use @code{dmenu} as an interface to
+your @code{pass} password data.  It supports integration with both X11
+clipboard and @code{xdotool}.")))
-- 
2.13.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-10 13:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-22 12:35 [bug#27791] [PATCH] gnu: Add passmenu Jelle Licht
2017-07-22 13:00 ` Marius Bakke
2017-10-16 13:22   ` Ludovic Courtès
2017-10-16 14:05     ` Jelle Licht
2017-10-16 22:09       ` Marius Bakke
2017-11-10 13:50         ` bug#27791: " Jelle Licht

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.