From patchwork Wed May 1 20:29:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 26804 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D362327BBEA; Wed, 1 May 2024 21:30:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 183A927BBE2 for ; Wed, 1 May 2024 21:30:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2GaE-0006SB-M5; Wed, 01 May 2024 16:29:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2GaD-0006Rh-Hp for guix-patches@gnu.org; Wed, 01 May 2024 16:29:41 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2GaD-0006ca-9M for guix-patches@gnu.org; Wed, 01 May 2024 16:29:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2GaY-000671-D1 for guix-patches@gnu.org; Wed, 01 May 2024 16:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70703] [PATCH 2/2] gnu: Add rofi-pass-wayland. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 May 2024 20:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70703 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70703@debbugs.gnu.org Cc: John Kehayias Received: via spool by 70703-submit@debbugs.gnu.org id=B70703.171459537523454 (code B ref 70703); Wed, 01 May 2024 20:30:02 +0000 Received: (at 70703) by debbugs.gnu.org; 1 May 2024 20:29:35 +0000 Received: from localhost ([127.0.0.1]:39263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2Ga6-00066E-PE for submit@debbugs.gnu.org; Wed, 01 May 2024 16:29:35 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:18569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2Ga4-00065w-Rl for 70703@debbugs.gnu.org; Wed, 01 May 2024 16:29:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1714595345; x=1714854545; bh=b7gLxMgT3iBZ6OyiDdv2z3ZXlAnWbfJusPvhCUNxTCA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Vu1ojXCUquHmaRc0IGt0b+f2/dRM86+v+cRhDSKuZSOVxTXdX1txCDK6axxTEMZhz pFWcte2FYoKUiboe32CeB6WsGZkrdaYTmXIyx/LObPmB1ziOrDk3ppQr4TvgfQ7mhk ow+zV7xL7yMlhw6t+pBY6SRLwRfb5cquP5P+Cu1cleK4eYEQOUhs/Wl8BYjI/X3phR UNvsRxZEYUxcGg0E+A/Kgnf2yfB0Zf4Z807bctfCszsnQ8tHofMoYPNfuO0jMuH17H /uyhz8g8i6SS2AEtZ5TJlBs9MjZ7aadP9m2ciQe8R1Y6M/WjwTnQVD08k9wZd4xI3L TB0JKY0J3fe5w== Date: Wed, 01 May 2024 20:29:00 +0000 Message-ID: <002c0ca60424a755617fc59aeb8a7a9214b369b6.1714594998.git.john.kehayias@protonmail.com> In-Reply-To: References: Feedback-ID: 7805494:user:proton X-Pm-Message-ID: 7c6f3cf6d99a5f860394dda2e71c89b3ec67fed4 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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(+) -- 2.41.0 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")