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 oJpbKMSkIWBNSwAA0tVLHw (envelope-from ) for ; Mon, 08 Feb 2021 20:53:24 +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 IDs6JMSkIWCOEgAAB5/wlQ (envelope-from ) for ; Mon, 08 Feb 2021 20:53:24 +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 50E629403AA for ; Mon, 8 Feb 2021 20:53:23 +0000 (UTC) Received: from localhost ([::1]:46780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9DX8-00047O-5J for larch@yhetil.org; Mon, 08 Feb 2021 15:53:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9A72-0005dp-Jg for guix-patches@gnu.org; Mon, 08 Feb 2021 12:14:14 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9A22-0004rQ-It for guix-patches@gnu.org; Mon, 08 Feb 2021 12:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9A22-0004cU-Cc for guix-patches@gnu.org; Mon, 08 Feb 2021 12:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45965] [PATCH] gnu: Add fzf. Resent-From: EuAndreh Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Feb 2021 17:09:02 +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: mail@nicolasgoaziou.fr, 45965@debbugs.gnu.org Cc: EuAndreh Received: via spool by 45965-submit@debbugs.gnu.org id=B45965.161280412117723 (code B ref 45965); Mon, 08 Feb 2021 17:09:02 +0000 Received: (at 45965) by debbugs.gnu.org; 8 Feb 2021 17:08:41 +0000 Received: from localhost ([127.0.0.1]:51795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9A1g-0004bm-Ol for submit@debbugs.gnu.org; Mon, 08 Feb 2021 12:08:40 -0500 Received: from box.euandre.org ([46.101.160.115]:55875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9A1e-0004bZ-3Q for 45965@debbugs.gnu.org; Mon, 08 Feb 2021 12:08:39 -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 06B61FC3F7; Mon, 8 Feb 2021 14:08:30 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=euandre.org; s=mail; t=1612804112; bh=SGC67XDans0fk8MAcaMolNlzE6CVYYQrnQvXhOU+w84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qjUmr4Hn9uW2OdJ/1DcG492qkSEUUmbcL8mUjB5x2L/siM3pbdejJvbl+EjeklkWK cucS6wPYIkuS5XlUTTk7Dsd2+I4c8QRNvG7sG9kQthn4oNbE39jMm0JU4N3aXjkRB/ v68Qq0T9o7pvurQvCH2Wd895YhbcFwu0rue3huWfpGmm0RS3e1lsho8r6W25oOt0b7 ONn3vvu+g03aAuxJDa3tpq+jiCxPH7KHkh+EAn6lWNCmPuq6GAKitma2R6ASowtpXq AeqYwwRoKlklVPTYoLC9l24uoBOa58XJdXeyHJSj3ASr/dESVojeXfyBCzVXHkF5sd hxoXIgCphdTYg== Date: Mon, 8 Feb 2021 14:08:27 -0300 Message-Id: <20210208170827.29641-1-eu@euandre.org> In-Reply-To: <87v9b6ywml.fsf@euandre.org> References: <87v9b6ywml.fsf@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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: EuAndreh X-ACL-Warn: , EuAndreh via Guix-patches From: EuAndreh via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 1.14 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=euandre.org header.s=mail header.b=qjUmr4Hn; 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: 50E629403AA X-Spam-Score: 1.14 X-Migadu-Scanner: scn1.migadu.com X-TUID: SH0l8kHinEMP * gnu/packages/terminals.scm (fzf): New variable, which inherits from the existing go-github-com-junegunn-fzf package, but also install other binary, and completion for direct usage. --- Done as discussed. gnu/packages/terminals.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index a9897ec623..7ccba97968 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -824,6 +824,43 @@ programmer to write text-based user interfaces.") usable with any list--including files, command history, processes and more.") (license license:expat))) +(define-public fzf + (package + (inherit go-github-com-junegunn-fzf) + (name "fzf") + (arguments + `(,@(ensure-keyword-arguments + (package-arguments go-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 + `(,@(package-inputs go-github-com-junegunn-fzf) + ("ncurses" ,ncurses))))) + (define-public go-github.com-howeyc-gopass (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8") (revision "0")) -- 2.30.0