guix_mirror_bot pushed a commit to branch master
in repository guix.

commit af0385fcb4ccf1494c3165b6524fc19cdc029462
Author: Sharlatan Hellseher <sharlata...@gmail.com>
AuthorDate: Wed Jun 11 20:33:20 2025 +0100

    gnu: fzf: Use G-expression, do not inherit.
    
    fzf is the final program where go-github-com-junegunn-fzf has no users
    as Golang library, this change merges two packages into single one with
    refactoring.
    
    * gnu/packages/terminals.scm (fzf): Use G-expressions; do not inherit
    from go-github-com-junegunn-fzf.
    
    (go-github-com-junegunn-fzf): Delete variable.
    
    Change-Id: Iaf46dd01377f1c8c1c5f35f9fc0cc399ee12c6e8
---
 gnu/packages/terminals.scm | 89 ++++++++++++++++++++--------------------------
 1 file changed, 39 insertions(+), 50 deletions(-)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index b8989da192..0f8ceb8788 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -990,9 +990,9 @@ minimalistic.")
       (home-page "https://www.uninformativ.de/git/xiate/file/README.html";)
       (license license:expat))))
 
-(define-public go-github-com-junegunn-fzf
+(define-public fzf
   (package
-    (name "go-github-com-junegunn-fzf")
+    (name "fzf")
     (version "0.62.0")
     (source
      (origin
@@ -1002,59 +1002,36 @@ minimalistic.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32
-         "1kwia7dmsaq08048h3s6avrczvca2mpd8sa3m4r1y28wjqjxmkbk"))))
+        (base32 "1kwia7dmsaq08048h3s6avrczvca2mpd8sa3m4r1y28wjqjxmkbk"))))
     (build-system go-build-system)
     (arguments
-     `(#:import-path "github.com/junegunn/fzf"))
-    (inputs
-     (list go-github-com-charlievieth-fastwalk
-           go-github-com-gdamore-tcell-v2
-           go-github-com-junegunn-go-shellwords
-           go-github-com-mattn-go-isatty
-           go-github-com-rivo-uniseg
-           go-golang-org-x-sys
-           go-golang-org-x-term))
-    (home-page "https://github.com/junegunn/fzf";)
-    (synopsis "Command-line fuzzy-finder")
-    (description "This package provides an interactive command-line filter
-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)
-      `(#:install-source? #f
-        #:phases
-        (modify-phases %standard-phases
+     (list
+      #:install-source? #f
+      #: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"))))))
+            (lambda* (#:key import-path #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (install-file "bin/fzf-tmux" (string-append #$output 
"/bin")))))
           (add-after 'copy-binaries 'wrap-programs
-            (lambda* (#:key outputs inputs #:allow-other-keys)
-              (let* ((out (assoc-ref outputs "out"))
-                     (bin (string-append out "/bin"))
-                     (findutils (assoc-ref inputs "findutils"))
-                     (ncurses (assoc-ref inputs "ncurses")))
+            (lambda _
+              (let* ((bin (string-append #$output "/bin"))
+                     (findutils #$(this-package-input "findutils"))
+                     (ncurses #$(this-package-input "ncurses")))
                 (wrap-program (string-append bin "/fzf")
                   `("PATH" ":" prefix (,(string-append findutils "/bin"))))
                 (wrap-program (string-append 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"))
+            (lambda* (#:key import-path #:allow-other-keys)
+              (let* ((bash-completion
+                      (string-append #$output "/etc/bash_completion.d"))
                      (fish-functions
-                       (string-append out "/share/fish/vendor_functions.d"))
-                     (zsh-completion (string-append out 
"/share/zsh/site-functions")))
-                (with-directory-excursion "src/github.com/junegunn/fzf"
+                      (string-append #$output 
"/share/fish/vendor_functions.d"))
+                     (zsh-completion
+                      (string-append #$output "/share/zsh/site-functions")))
+                (with-directory-excursion (string-append "src/" import-path)
                   (mkdir-p bash-completion)
                   (copy-file "shell/completion.bash"
                              (string-append bash-completion "/fzf"))
@@ -1063,12 +1040,24 @@ usable with any list--including files, command history, 
processes and more.")
                              (string-append fish-functions 
"/fzf_key_bindings.fish"))
                   (mkdir-p zsh-completion)
                   (copy-file "shell/completion.zsh"
-                             (string-append zsh-completion "/_fzf"))))))))))
+                             (string-append zsh-completion "/_fzf")))))))))
+    (native-inputs
+     (list go-github-com-charlievieth-fastwalk
+           go-github-com-gdamore-tcell-v2
+           go-github-com-junegunn-go-shellwords
+           go-github-com-mattn-go-isatty
+           go-github-com-rivo-uniseg
+           go-golang-org-x-sys
+           go-golang-org-x-term))
     (inputs
-     `(,@(package-inputs go-github-com-junegunn-fzf)
-       ("bash" ,bash-minimal) ; for wrap-program
-       ("findutils" ,findutils)
-       ("ncurses" ,ncurses)))))
+     (list bash-minimal
+           findutils
+           ncurses))
+    (home-page "https://github.com/junegunn/fzf";)
+    (synopsis "Command-line fuzzy-finder")
+    (description "This package provides an interactive command-line filter
+usable with any list--including files, command history, processes and more.")
+    (license license:expat)))
 
 (define-public python-pyte
   (package

Reply via email to