From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CIpIKjzcBWDhCQAA0tVLHw (envelope-from ) for ; Mon, 18 Jan 2021 19:06:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EC0VJjzcBWCPaQAAB5/wlQ (envelope-from ) for ; Mon, 18 Jan 2021 19:06:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E9289940111 for ; Mon, 18 Jan 2021 19:06:35 +0000 (UTC) Received: from localhost ([::1]:48122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1ZrG-0002t4-MC for larch@yhetil.org; Mon, 18 Jan 2021 14:06:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1Zqk-0002gz-Cf for guix-patches@gnu.org; Mon, 18 Jan 2021 14:06:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1Zqk-0002Tg-1X for guix-patches@gnu.org; Mon, 18 Jan 2021 14:06:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l1Zqj-0004D0-PL for guix-patches@gnu.org; Mon, 18 Jan 2021 14:06:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45965] [PATCH 1/2] gnu: go-github-com-junegunn-fzf: Copy binaries and install shell completions. References: <20210118185925.24412-1-eu@euandre.org> In-Reply-To: <20210118185925.24412-1-eu@euandre.org> Resent-From: EuAndreh Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 18 Jan 2021 19:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45965 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45965@debbugs.gnu.org Received: via spool by 45965-submit@debbugs.gnu.org id=B45965.161099671316102 (code B ref 45965); Mon, 18 Jan 2021 19:06:01 +0000 Received: (at 45965) by debbugs.gnu.org; 18 Jan 2021 19:05:13 +0000 Received: from localhost ([127.0.0.1]:48487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1Zpw-0004Bd-Ph for submit@debbugs.gnu.org; Mon, 18 Jan 2021 14:05:13 -0500 Received: from box.euandre.org ([46.101.160.115]:39923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1Zpt-0004BF-RY for 45965@debbugs.gnu.org; Mon, 18 Jan 2021 14:05:10 -0500 Received: from authenticated-user (box.euandre.org [46.101.160.115]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.euandre.org (Postfix) with ESMTPSA id 0B41CFD45A; Mon, 18 Jan 2021 16:05:02 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=euandre.org; s=mail; t=1610996704; bh=H/qw+HiIDitapABDW73Ckv6zzm3wLr78sBeJZE9IxdM=; h=From:To:Cc:Subject:Date:From; b=QnIPvid+uP8p0rT7ApZd9qIAelcjfNkDkXsVUtAVenAf/WeV/sqQCRV+5DQApCGMT nCMP48va73Dnb9j7spioU0os062LvDah7YZNnN1Tcu/yJGvpBh5JLlhXcpKywNvBTD r71hWde8W9eplW5NYRiXAf5R2UPgAkX2r4bMGqcCMQQCwVDiKWYCXl3GSfWk2DPRI1 wMGmMpkBEfll6tjkSLRi7F6t4770NJrXSEK4OAA1B3bGLTEJBZghWUahYhXuNpP2+7 WTp9uYgnqCMvDYBQkXVRb22dcgULSpq9lQuUa1U6i/mc2zyT2QAlXx13gVdYDveUxV glrwOjWJDdIXg== Date: Mon, 18 Jan 2021 16:04:58 -0300 Message-Id: <20210118190459.27787-1-eu@euandre.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Cc: EuAndreh Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: EuAndreh X-ACL-Warn: , EuAndreh via Guix-patches From: guix-patches--- via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 1.15 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=euandre.org header.s=mail header.b=QnIPvid+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E9289940111 X-Spam-Score: 1.15 X-Migadu-Scanner: scn1.migadu.com X-TUID: q/S5t73LLsBo * gnu/packages/terminals.scm (go-github-com-junegunn-fzf)[arguments]: Add copy-binaries, wrap-programs and install-completion phases. --- gnu/packages/terminals.scm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 74e1937bbc..308ff99bf0 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -813,7 +813,33 @@ programmer to write text-based user interfaces.") "0n0cy5q2r3dm1a3ivlzrv9c5d11awxlqim5b9x8zc85dlr73n35l")))) (build-system go-build-system) (arguments - `(#:import-path "github.com/junegunn/fzf")) + `(#:import-path "github.com/junegunn/fzf" + #:phases + (modify-phases %standard-phases + (add-after 'install 'copy-binaries + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion "src/github.com/junegunn/fzf" + (install-file "bin/fzf-tmux" + (string-append out "/bin")))))) + (add-after 'copy-binaries 'wrap-programs + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (ncurses (assoc-ref inputs "ncurses"))) + (wrap-program (string-append out "/bin/fzf-tmux") + `("PATH" ":" prefix (,(string-append ncurses "/bin"))))))) + (add-after 'install 'install-completions + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash-completion (string-append out "/etc/bash_completion.d")) + (zsh-completion (string-append out "/share/zsh/site-functions"))) + (with-directory-excursion "src/github.com/junegunn/fzf" + (mkdir-p bash-completion) + (copy-file "shell/completion.bash" + (string-append bash-completion "/fzf")) + (mkdir-p zsh-completion) + (copy-file "shell/completion.zsh" + (string-append zsh-completion "/_fzf"))))))))) (inputs `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth) ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords) @@ -821,7 +847,8 @@ programmer to write text-based user interfaces.") ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell) ("go-github-com-saracen-walker" ,go-github-com-saracen-walker) ("go-golang.org-x-sync-errgroup" ,go-golang.org-x-sync-errgroup) - ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) + ("ncurses" ,ncurses))) (home-page "https://github.com/junegunn/fzf") (synopsis "Command-line fuzzy-finder") (description "This package provides an interactive command-line filter -- 2.30.0