sharlatan pushed a commit to branch go-team
in repository guix.

commit a5ab3f249a1dc5191901c76a86e9616cadb3120f
Author: Herman Rimm <[email protected]>
AuthorDate: Tue Dec 3 14:15:01 2024 +0100

    gnu: Add go-github-com-charmbracelet-x-input.
    
    * gnu/packages/golang-xyz.scm (go-github-com-charmbracelet-x-input,
    go-github-com-charmbracelet-x-ansi-0.4.5): New variables.
    
    Change-Id: I523dbbf6ea5734fd88a9ca817bb31c26facf13dc
    Co-authored-by: Sharlatan Hellseher <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/golang-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 0e3ce96cef..421fe1a2a4 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -1773,6 +1773,61 @@ tools.")
 ECMA-48} specs.")
     (license license:expat)))
 
+;; XXX: This is for making the package compatible with
+;; go-github-com-charmbracelet-x-input, see
+;; <https://github.com/charmbracelet/x/issues/296> and
+;; <https://github.com/charmbracelet/x/pull/295>.
+;; Remove when a new tag is placed.
+(define go-github-com-charmbracelet-x-ansi-0.4.5
+  (package
+    (inherit go-github-com-charmbracelet-x-ansi)
+    (name "go-github-com-charmbracelet-x-ansi")
+    (version "0.4.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/charmbracelet/x";)
+             (commit (go-version->git-ref version
+                                          #:subdir "ansi"))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "10ivngjp9ifm8b50pkxrwdzan6hn4s3l9fxi6wiqiwy6m2v41a0a"))))))
+
+(define-public go-github-com-charmbracelet-x-input
+  (package
+    (name "go-github-com-charmbracelet-x-input")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/charmbracelet/x";)
+             (commit (go-version->git-ref version
+                                          #:subdir "input"))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0sby6rvi04nga2iv823slsgydqlianfl6k3fgjvjzfyxd68lqxsp"))
+       (snippet
+        #~(begin (use-modules (guix build utils))
+                 (delete-file-recursively "ansi")))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/charmbracelet/x/input"
+      #:unpack-path "github.com/charmbracelet/x"))
+    (propagated-inputs
+     (list go-github-com-charmbracelet-x-ansi-0.4.5
+           go-github-com-erikgeiser-coninput
+           go-github-com-muesli-cancelreader
+           go-github-com-xo-terminfo
+           go-golang-org-x-sys))
+    (home-page "https://github.com/charmbracelet/x";)
+    (synopsis "Terminal event input handler and driver")
+    (description
+     "This package provides a terminal event input handler and driver.")
+    (license license:expat)))
+
 (define-public go-github-com-charmbracelet-x-term
   (package
     (name "go-github-com-charmbracelet-x-term")

Reply via email to