From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: 70703@debbugs.gnu.org
Cc: John Kehayias <john.kehayias@protonmail.com>
Subject: [bug#70703] [PATCH 2/2] gnu: Add rofi-pass-wayland.
Date: Wed, 01 May 2024 20:29:00 +0000 [thread overview]
Message-ID: <002c0ca60424a755617fc59aeb8a7a9214b369b6.1714594998.git.john.kehayias@protonmail.com> (raw)
In-Reply-To: <cover.1714594998.git.john.kehayias@protonmail.com>
This variant of rofi-pass swaps out the X-related tools used for Wayland
versions and changes the default configuration file to use them.
* gnu/packages/password-utils.scm (rofi-pass-wayland): New variable.
Change-Id: Ie844fc2f3a7f49fd6322e5418a6944b6b941abce
---
gnu/packages/password-utils.scm | 47 +++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 96243a60ea..50d098ca5f 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -976,6 +976,53 @@ (define-public rofi-pass
@end enumerate")
(license license:gpl3))))
+(define-public rofi-pass-wayland
+ (package
+ (inherit rofi-pass)
+ (name "rofi-pass-wayland")
+ (arguments
+ (substitute-keyword-arguments (package-arguments rofi-pass)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ ;; Set the clipboard and backend tools to ones for Wayland in the
+ ;; default configuration file.
+ (add-after 'fix-etc-path 'set-wayland-defaults
+ (lambda _
+ (substitute* "config.example"
+ ;; Note the typo in current configuration.
+ (("#clibpoard_backend=xclip")
+ "clipboard_backend=wl-clipboard")
+ (("#backend=xdotool")
+ "backend=wtype"))
+ (substitute* "rofi-pass"
+ (("/etc")
+ (string-append #$output "/etc")))))
+ ;; Use Wayland related tools instead.
+ (replace 'wrap-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bin (string-append #$output "/bin")))
+ (for-each
+ (lambda (script)
+ (wrap-program (string-append bin "/" script)
+ (list "PATH" 'prefix
+ (map
+ (lambda (binary)
+ (dirname (search-input-file
+ inputs
+ (string-append "bin/" binary))))
+ ;; wl-copy for wl-clipboard.
+ '("pass" "pwgen" "rofi" "wl-copy" "wtype")))))
+ (list "addpass" "rofi-pass")))))))))
+ (inputs
+ (modify-inputs (package-inputs rofi-pass)
+ (replace "rofi" rofi-wayland)
+ (replace "xclip" wl-clipboard)
+ (replace "xdotool" wtype)
+ (delete "xset")))
+ (description (string-append
+ (package-description rofi-pass)
+ "\nThis package provides Wayland support by default."))))
+
(define-public tessen
(package
(name "tessen")
--
2.41.0
prev parent reply other threads:[~2024-05-01 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 20:26 [bug#70703] [PATCH 0/2] Update rofi-pass; add rofi-pass-wayland John Kehayias via Guix-patches via
2024-05-01 20:28 ` [bug#70703] [PATCH 1/2] gnu: rofi-pass: Update to 2.0.2-0.8aa6b92 John Kehayias via Guix-patches via
2024-05-01 20:29 ` John Kehayias via Guix-patches via [this message]
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=002c0ca60424a755617fc59aeb8a7a9214b369b6.1714594998.git.john.kehayias@protonmail.com \
--to=guix-patches@gnu.org \
--cc=70703@debbugs.gnu.org \
--cc=john.kehayias@protonmail.com \
/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).