* [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions
@ 2021-01-18 18:59 guix-patches--- via
2021-01-18 19:04 ` [bug#45965] [PATCH 1/2] gnu: go-github-com-junegunn-fzf: Copy binaries and install shell completions guix-patches--- via
2021-02-05 20:57 ` [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions Nicolas Goaziou
0 siblings, 2 replies; 8+ messages in thread
From: guix-patches--- via @ 2021-01-18 18:59 UTC (permalink / raw)
To: 45965; +Cc: EuAndreh
I've tested both the package update and the extra phases added.
The Bash completions are being installed properly, but I haven't tested
the zsh ones.
I remember seeing somewhere a discussion on aliasing this type of package,
so that the "go-github-com-junegunn-fzf" is the default imported Go module,
to be used as input for other packages, and adding a top-level "fzf" package,
which does the ad-hoc packaging code I've added, so that a user can install
the "fzf" package with Bash integration and similar features.
I couldn't find anything on the manual also, I welcome comments on this :)
EuAndreh (2):
gnu: go-github-com-junegunn-fzf: Copy binaries and install shell
completions.
gnu: go-github-com-junegunn-fzf: Update to 0.25.0.
gnu/packages/terminals.scm | 35 +++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
--
2.30.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#45965] [PATCH 1/2] gnu: go-github-com-junegunn-fzf: Copy binaries and install shell completions.
2021-01-18 18:59 [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions guix-patches--- via
@ 2021-01-18 19:04 ` guix-patches--- via
2021-01-18 19:04 ` [bug#45965] [PATCH 2/2] gnu: go-github-com-junegunn-fzf: Update to 0.25.0 guix-patches--- via
2021-02-05 20:57 ` [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions Nicolas Goaziou
1 sibling, 1 reply; 8+ messages in thread
From: guix-patches--- via @ 2021-01-18 19:04 UTC (permalink / raw)
To: 45965; +Cc: EuAndreh
* 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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#45965] [PATCH 2/2] gnu: go-github-com-junegunn-fzf: Update to 0.25.0.
2021-01-18 19:04 ` [bug#45965] [PATCH 1/2] gnu: go-github-com-junegunn-fzf: Copy binaries and install shell completions guix-patches--- via
@ 2021-01-18 19:04 ` guix-patches--- via
0 siblings, 0 replies; 8+ messages in thread
From: guix-patches--- via @ 2021-01-18 19:04 UTC (permalink / raw)
To: 45965; +Cc: EuAndreh
* gnu/packages/terminals.scm (go-github-com-junegunn-fzf): Update to 0.25.0.
---
gnu/packages/terminals.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 308ff99bf0..9c89134aaa 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -800,7 +800,7 @@ programmer to write text-based user interfaces.")
(define-public go-github-com-junegunn-fzf
(package
(name "go-github-com-junegunn-fzf")
- (version "0.22.0")
+ (version "0.25.0")
(source
(origin
(method git-fetch)
@@ -810,7 +810,7 @@ programmer to write text-based user interfaces.")
(file-name (git-file-name name version))
(sha256
(base32
- "0n0cy5q2r3dm1a3ivlzrv9c5d11awxlqim5b9x8zc85dlr73n35l"))))
+ "1j5bfxl4w8w3n89p051y8dhxg0py9l98v7r2gkr63bg4lj32faz8"))))
(build-system go-build-system)
(arguments
`(#:import-path "github.com/junegunn/fzf"
--
2.30.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions
2021-01-18 18:59 [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions guix-patches--- via
2021-01-18 19:04 ` [bug#45965] [PATCH 1/2] gnu: go-github-com-junegunn-fzf: Copy binaries and install shell completions guix-patches--- via
@ 2021-02-05 20:57 ` Nicolas Goaziou
2021-02-05 22:31 ` EuAndreh via Guix-patches via
1 sibling, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2021-02-05 20:57 UTC (permalink / raw)
To: 45965; +Cc: eu
Hello,
guix-patches--- via <guix-patches@gnu.org> writes:
> I've tested both the package update and the extra phases added.
> The Bash completions are being installed properly, but I haven't tested
> the zsh ones.
>
> I remember seeing somewhere a discussion on aliasing this type of package,
> so that the "go-github-com-junegunn-fzf" is the default imported Go module,
> to be used as input for other packages, and adding a top-level "fzf" package,
> which does the ad-hoc packaging code I've added, so that a user can install
> the "fzf" package with Bash integration and similar features.
Indeed, having to install "go-github-com-junegunn-fzf" when you are
really looking for "fzf" is not very intuitive.
So, "fzf" could inherit from "go-github-com-junegunn-fzf" and add all
the bells and whistles.
Would you want to provide a patch for that?
Meanwhile, I'm going to apply the update and leave the first patch out.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions
2021-02-05 20:57 ` [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions Nicolas Goaziou
@ 2021-02-05 22:31 ` EuAndreh via Guix-patches via
2021-02-08 17:08 ` [bug#45965] [PATCH] gnu: Add fzf EuAndreh via Guix-patches via
0 siblings, 1 reply; 8+ messages in thread
From: EuAndreh via Guix-patches via @ 2021-02-05 22:31 UTC (permalink / raw)
To: Nicolas Goaziou, 45965
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Would you want to provide a patch for that?
Sure, I'll do it in the next few days.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#45965] [PATCH] gnu: Add fzf.
2021-02-05 22:31 ` EuAndreh via Guix-patches via
@ 2021-02-08 17:08 ` EuAndreh via Guix-patches via
2021-03-19 21:15 ` bug#45965: [PATCH 0/2] Update fzf, include binaries and install completions Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: EuAndreh via Guix-patches via @ 2021-02-08 17:08 UTC (permalink / raw)
To: mail, 45965; +Cc: EuAndreh
* 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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#45965: [PATCH 0/2] Update fzf, include binaries and install completions
2021-02-08 17:08 ` [bug#45965] [PATCH] gnu: Add fzf EuAndreh via Guix-patches via
@ 2021-03-19 21:15 ` Ludovic Courtès
2021-03-21 13:42 ` [bug#45965] " EuAndreh via Guix-patches via
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2021-03-19 21:15 UTC (permalink / raw)
To: EuAndreh; +Cc: 45965-done, mail
Hi,
EuAndreh <eu@euandre.org> skribis:
> * 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.
I think it had fallen through the cracks; applied!
> + (arguments
> + `(,@(ensure-keyword-arguments
^^^
I simplified this to:
(arguments (ensure-keyword-arguments …))
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-03-21 13:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-18 18:59 [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions guix-patches--- via
2021-01-18 19:04 ` [bug#45965] [PATCH 1/2] gnu: go-github-com-junegunn-fzf: Copy binaries and install shell completions guix-patches--- via
2021-01-18 19:04 ` [bug#45965] [PATCH 2/2] gnu: go-github-com-junegunn-fzf: Update to 0.25.0 guix-patches--- via
2021-02-05 20:57 ` [bug#45965] [PATCH 0/2] Update fzf, include binaries and install completions Nicolas Goaziou
2021-02-05 22:31 ` EuAndreh via Guix-patches via
2021-02-08 17:08 ` [bug#45965] [PATCH] gnu: Add fzf EuAndreh via Guix-patches via
2021-03-19 21:15 ` bug#45965: [PATCH 0/2] Update fzf, include binaries and install completions Ludovic Courtès
2021-03-21 13:42 ` [bug#45965] " EuAndreh via Guix-patches via
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).