all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jelle Licht <jlicht@fsfe.org>
To: 27791@debbugs.gnu.org
Subject: [bug#27791] [PATCH] gnu: Add passmenu
Date: Sat, 22 Jul 2017 14:35:56 +0200	[thread overview]
Message-ID: <CAPsKtfKfXFQUpZHPy_iv3Fq5oVtrty4+RRi2+mfYsk9MchrJUw@mail.gmail.com> (raw)


[-- 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


             reply	other threads:[~2017-07-22 12:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-22 12:35 Jelle Licht [this message]
2017-07-22 13:00 ` [bug#27791] [PATCH] gnu: Add passmenu 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

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

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

  git send-email \
    --in-reply-to=CAPsKtfKfXFQUpZHPy_iv3Fq5oVtrty4+RRi2+mfYsk9MchrJUw@mail.gmail.com \
    --to=jlicht@fsfe.org \
    --cc=27791@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 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.