summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2024-05-01 20:29:00 +0000
committerJohn Kehayias <john.kehayias@protonmail.com>2024-06-26 15:16:59 -0400
commit947005f5eea7f9e92060faefdeb705afb3d1878d (patch)
tree9a820cc44e53b876f4aa8324c66f48e1df9e65f4 /gnu/packages
parenteef9e0ee8fc7201020a3ef31c28a07023e23dc0c (diff)
downloadguix-patches-947005f5eea7f9e92060faefdeb705afb3d1878d.tar
guix-patches-947005f5eea7f9e92060faefdeb705afb3d1878d.tar.gz
gnu: Add rofi-pass-wayland.
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
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/password-utils.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index d77aa1c8b0..499c8b8312 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -976,6 +976,53 @@ using password-store through rofi interface:
@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")