[PATCH 1/4] gnu: Add go-github-com-gdamore-tcell-v2.

  • Done
  • quality assurance status badge
Details
2 participants
  • jgart
  • Maxim Cournoyer
Owner
unassigned
Submitted by
jgart
Severity
normal
J
(address . guix-patches@gnu.org)
20210830164041.19770-1-jgart@dismail.de
From: Guix Together <jgart@dismail.de>

* gnu/packages/golang.scm (go-github-com-gdamore-tcell-v2): New variable.

Co-authored-by: Arun Isaac <arunisaac@systemreboot.net>
Co-authored-by: Brice Waegeneire <brice@waegenei.re>
Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Julien Lepiller <julien@lepiller.eu>
---
gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 72579d6bd2..f52343345b 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5257,6 +5257,38 @@ formatting. It also favors portability, and includes support for all POSIX
systems.")
(license license:expat))))
+(define-public go-github-com-gdamore-tcell-v2
+ (package
+ (inherit go-github-com-gdamore-tcell)
+ (name "go-github-com-gdamore-tcell")
+ (version "2.3.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gdamore/tcell")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ypbl5080q9sd3irad8mv7zlg4242i8pmg5xyhbyq95kymwibaid"))))
+ (arguments
+ `(#:import-path "github.com/gdamore/tcell/v2"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'reset-gzip-timestamps 'make-files-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Make sure .gz files are writable so that the
+ ;; 'reset-gzip-timestamps' phase can do its work.
+ (let ((out (assoc-ref outputs "out")))
+ (for-each make-file-writable
+ (find-files out "\\.gz$"))
+ #t))))))
+ (propagated-inputs
+ `(("go-golang-org-x-term" ,go-golang-org-x-term)
+ ("go-golang-org-x-sys" ,go-golang-org-x-sys)
+ ,@(package-inputs go-github-com-gdamore-tcell)))))
+
(define-public go-github-com-mattn-go-shellwords
(let ((commit "2444a32a19f450fabaa0bb3e96a703f15d9a97d2")
(version "1.0.5")
--
2.33.0
M
M
Maxim Cournoyer wrote on 30 Aug 2021 20:57
(name . jgart)(address . jgart@dismail.de)
87wno2lq05.fsf@gmail.com
Hello!

jgart <jgart@dismail.de> writes:

Toggle quote (9 lines)
> From: Guix Together <jgart@dismail.de>
>
> * gnu/packages/golang.scm (go-github-com-gdamore-tcell-v2): New variable.
>
> Co-authored-by: Arun Isaac <arunisaac@systemreboot.net>
> Co-authored-by: Brice Waegeneire <brice@waegenei.re>
> Co-authored-by: jgart <jgart@dismail.de>
> Co-authored-by: Julien Lepiller <julien@lepiller.eu>

This is awesome!

Toggle quote (40 lines)
> ---
> gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index 72579d6bd2..f52343345b 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -5257,6 +5257,38 @@ formatting. It also favors portability, and includes support for all POSIX
> systems.")
> (license license:expat))))
>
> +(define-public go-github-com-gdamore-tcell-v2
> + (package
> + (inherit go-github-com-gdamore-tcell)
> + (name "go-github-com-gdamore-tcell")
> + (version "2.3.1")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/gdamore/tcell")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0ypbl5080q9sd3irad8mv7zlg4242i8pmg5xyhbyq95kymwibaid"))))
> + (arguments
> + `(#:import-path "github.com/gdamore/tcell/v2"
> + #:phases
> + (modify-phases %standard-phases
> + (add-before 'reset-gzip-timestamps 'make-files-writable
> + (lambda* (#:key outputs #:allow-other-keys)
> + ;; Make sure .gz files are writable so that the
> + ;; 'reset-gzip-timestamps' phase can do its work.
> + (let ((out (assoc-ref outputs "out")))
> + (for-each make-file-writable
> + (find-files out "\\.gz$"))
> + #t))))))

Note that you can preemptively start loosing the trailing #t; the
warning will vanish after the guix-core-updates-frozen branch is merged
into master.

Toggle quote (9 lines)
> + (propagated-inputs
> + `(("go-golang-org-x-term" ,go-golang-org-x-term)
> + ("go-golang-org-x-sys" ,go-golang-org-x-sys)
> + ,@(package-inputs go-github-com-gdamore-tcell)))))
> +
> (define-public go-github-com-mattn-go-shellwords
> (let ((commit "2444a32a19f450fabaa0bb3e96a703f15d9a97d2")
> (version "1.0.5")

LGTM. I fixed the license of the parent package (it should have been
Apache 2.0) and pushed as cc71a54e9f900e905192f794c7bc5346c445e651.

Closing.

Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 50275@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 50275
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch