From patchwork Tue Oct 5 11:23:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 33619 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 4972B27BBE3; Tue, 5 Oct 2021 12:27:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E2AA927BBE1 for ; Tue, 5 Oct 2021 12:27:11 +0100 (BST) Received: from localhost ([::1]:36638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXibG-00019a-TZ for patchwork@mira.cbaines.net; Tue, 05 Oct 2021 07:27:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXib8-00017i-LT for guix-patches@gnu.org; Tue, 05 Oct 2021 07:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXib8-00073f-D2 for guix-patches@gnu.org; Tue, 05 Oct 2021 07:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXib8-0002kc-9v for guix-patches@gnu.org; Tue, 05 Oct 2021 07:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51031] [PATCH] gnu: Add wl-clipboard-x11. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Oct 2021 11:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51031 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51031@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163343321210545 (code B ref -1); Tue, 05 Oct 2021 11:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Oct 2021 11:26:52 +0000 Received: from localhost ([127.0.0.1]:39210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXias-0002jt-US for submit@debbugs.gnu.org; Tue, 05 Oct 2021 07:26:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:39200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXiar-0002jl-7K for submit@debbugs.gnu.org; Tue, 05 Oct 2021 07:26:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXiaq-0000YF-Va for guix-patches@gnu.org; Tue, 05 Oct 2021 07:26:44 -0400 Received: from flashner.co.il ([178.62.234.194]:55258) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXiap-0006qE-1b for guix-patches@gnu.org; Tue, 05 Oct 2021 07:26:44 -0400 Received: from localhost (unknown [141.226.169.107]) by flashner.co.il (Postfix) with ESMTPSA id B9BFD40333; Tue, 5 Oct 2021 11:26:40 +0000 (UTC) From: Efraim Flashner Date: Tue, 5 Oct 2021 14:23:58 +0300 Message-Id: <73a4e018a8b7af10005531a50dc7b38059bc08c6.1633432986.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/xdisorg.scm (wl-clipboard-x11): New variable. --- gnu/packages/xdisorg.scm | 46 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) base-commit: b54bf075c577b9f78041362035383dbbfb456617 diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 45ea4f2e76..8d3af69998 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2015 Florian Paul Schmidt ;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016, 2018 Ricardo Wurmus -;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner +;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017, 2019, 2020 Marius Bakke ;;; Copyright © 2016 Petter @@ -67,6 +67,7 @@ (define-module (gnu packages xdisorg) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) @@ -2380,6 +2381,49 @@ (define-public wl-clipboard Wayland.") (license license:gpl3+))) +(define-public wl-clipboard-x11 + (package + (name "wl-clipboard-x11") + (version "5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/brunelli/wl-clipboard-x11") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1y7jv7rps0sdzmm859wn2l8q4pg2x35smcrm7mbfxn5vrga0bslb")))) + (build-system copy-build-system) + (arguments + `(#:install-plan + '(("src/" "bin/") + ("man/" "man/man1")) + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-binary + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (wl-clipboard (assoc-ref inputs "wl-clipboard"))) + (wrap-program (string-append out "/bin/wl-clipboard-x11") + `("PATH" prefix (,(string-append wl-clipboard "/bin"))))) + #t)) + (add-after 'wrap-binary 'symlink-utilities + ;; As seen in the Makefile. + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) + (symlink "wl-clipboard-x11" (string-append bin "xclip")) + (symlink "wl-clipboard-x11" (string-append bin "xsel"))) + #t))))) + (inputs + `(("wl-clipboard" ,wl-clipboard))) + (home-page "https://github.com/brunelli/wl-clipboard-x11") + (synopsis "Use wl-clipboard as a drop-in replacement to X11 clipboard tools") + (description "This package provides a wrapper script around +@code{x11-clipboard} to use it as a clipboard on X11 also. It also contains +helper scripts for @code{xclip} and @code{xsel} to assist with the transition.") + (license license:gpl3+))) + (define-public autocutsel (package (name "autocutsel")