[PATCH 00/28] Add gh and dependencies

  • Open
  • quality assurance status badge
Details
5 participants
  • Jack Hill
  • Leo Prikler
  • Leo Famulari
  • Xinglu Chen
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Xinglu Chen
Severity
normal
X
X
Xinglu Chen wrote on 1 Apr 2021 09:51
(address . guix-patches@gnu.org)
cover.1617262223.git.public@yoctocell.xyz
This patchset adds the 'gh' package, a CLI interface to GitHub. The Go
importer did most of the work. :)

Some things to note:

- When building'gh', I couldn't get
'go-github-com-charmbracelet-glamour' to build without moving some
native-inputs to propagated-inputs, though, if I was only building
'go-github-com-charmbracelet-glamour' it would build without moving
things to propagated-inputs. I am not sure why this happens.

- I found that (gnu packages syncthing) contained quite a few Go
packages, I think it would make sense to move those packages to (gnu
packages golang), and move the Syncthing package to (gnu packages
sync). This would be done in a separate commit though.

- The patch marked with 'D' adds a package which has been deprecated by
upstream, but it is still needed by one of the packages that 'gh'
depend on. I have marked it as a hidden package, let me know if this
is the right decision.

- The patch marked with 'W' adds a package which is needed by 'gh', but
only used on Windows. It is still Free Software (BSD-2), but I have
also marked it as hidden.

Xinglu Chen (28):
gnu: go-github-com-charmbracelet-glamour: Move some inputs to
propagated-inputs.
gnu: Add go-github-com-hinshun-vt10x.
gnu: Add go-github-com-creack-pty.
D gnu: Add go-github-com-kr-pty.
gnu: Add go-github-com-netflix-go-expect.
gnu: Add go-github-com-alecaivazis-survey-v2.
gnu: Add go-github-com-makenowjust-heredoc.
gnu: Add go-github-com-briandowns-spinner.
gnu: Add go-github-com-cli-browser.
gnu: Add go-github-com-cli-oauth.
W gnu: Add go-github-com-cli-safeexec.
gnu: Add go-github-com-russross-blackfriday-v2.
gnu: Add go-github-com-shurcool-sanitized-anchor-name.
gnu: Add go-github-com-cpuguy83-go-md2man-v2.
gnu: Add go-github-com-enescakir-emoji.
gnu: Add go-github-com-gabriel-vasile-mimetype.
gnu: Add go-github-com-google-shlex.
gnu: Add go-github-com-henvic-httpretty.
gnu: Add go-github-com-itchyny-go-flags.
gnu: Add go-github-com-itchyny-timefmt-go.
gnu: Add go-github-com-itchyny-gojq.
gnu: Add go-github-com-mattn-go-runewidth.
gnu: Add go-github-com-rivo-uniseg.
gnu: Add go-github-com-shurcool-githubv4.
gnu: Add go-gopkg-in-yaml-v3.
gnu: Add go-github-com-shurcool-graphql.
gnu: Add go-github-com-cli-shurcool-graphql.
gnu: Add gh.

gnu/packages/golang.scm | 745 ++++++++++++++++++++++++++++++-
gnu/packages/version-control.scm | 92 ++++
2 files changed, 826 insertions(+), 11 deletions(-)


base-commit: 94c77c9a0f7a1a4d7665d8fe566547016d2588d9
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:01
[PATCH 20/28] gnu: Add go-github-com-itchyny-timefmt-go.
(address . 47539@debbugs.gnu.org)
f297ab1510f359b26aa194223c0f3a123a93c69e.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-timefmt-go): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 2750443484..285622c5a0 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7546,3 +7546,27 @@ provides more options and uses reflection to provide a convenient and succinct
way of specifying command line options.")
(license license:bsd-3)))
+(define-public go-github-com-itchyny-timefmt-go
+ (package
+ (name "go-github-com-itchyny-timefmt-go")
+ (version "0.1.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/timefmt-go.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hfpvmbmzp5zbzz84p030jzd00jclnf4zr16f9r5bbq7xlhncj0z"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/itchyny/timefmt-go"))
+ (home-page
+ "https://github.com/itchyny/timefmt-go")
+ (synopsis "Efficient time formatting library for Go")
+ (description "This package provides functions for formatting and parsing
+date time strings.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 21/28] gnu: Add go-github-com-itchyny-gojq.
(address . 47539@debbugs.gnu.org)
d324e9bc2eaf452edcade8c2c466e371d22d1171.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-gojq): New variable.
---
gnu/packages/golang.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 285622c5a0..3738e207b4 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7570,3 +7570,41 @@ way of specifying command line options.")
date time strings.")
(license license:expat)))
+(define-public go-github-com-itchyny-gojq
+ (package
+ (name "go-github-com-itchyny-gojq")
+ (version "0.12.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/gojq.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pxm341sgqkscwifpxlkvchz8ix3wivp80p59dv257kaa9diymgz"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/itchyny/gojq"))
+ (native-inputs
+ `(("go-gopkg-in-yaml-v3" ,go-gopkg-in-yaml-v3)
+ ("go-golang-org-x-sys" ,go-golang-org-x-sys)
+ ("go-github-com-mattn-go-runewidth"
+ ,go-github-com-mattn-go-runewidth)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-itchyny-go-flags"
+ ,go-github-com-itchyny-go-flags)
+ ("go-github-com-google-go-cmp-cmp"
+ ,go-github-com-google-go-cmp-cmp)))
+ (propagated-inputs
+ `(("go-github-com-itchyny-timefmt-go"
+ ,go-github-com-itchyny-timefmt-go)))
+ (home-page "https://github.com/itchyny/gojq")
+ (synopsis "Pure Go implementation of jq")
+ (description "This package provides an implementation of @command{jq}
+command written in Go language. It is also embedable as a library to other Go
+projects.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 22/28] gnu: Add go-github-com-mattn-go-runewidth.
(address . 47539@debbugs.gnu.org)
d285a0b99eaddb9c13e06db8445270cebcd46a3e.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-mattn-go-runewidth): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 3738e207b4..a9ab18c77c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7608,3 +7608,29 @@ command written in Go language. It is also embedable as a library to other Go
projects.")
(license license:expat)))
+(define-public go-github-com-mattn-go-runewidth
+ (package
+ (name "go-github-com-mattn-go-runewidth")
+ (version "0.0.10")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mattn/go-runewidth.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jh9552ppqvkdfni7x623n0x5mbiaqqhjhmr0zkh28x56k4ysii4"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/mattn/go-runewidth"))
+ (native-inputs
+ `(("go-github-com-rivo-uniseg"
+ ,go-github-com-rivo-uniseg)))
+ (home-page "https://github.com/mattn/go-runewidth")
+ (synopsis "Functions to get fixed width of the character or string")
+ (description "This package provides functions to get fixed width of the
+character or string.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 23/28] gnu: Add go-github-com-rivo-uniseg.
(address . 47539@debbugs.gnu.org)
35ef7ed1d498b84881ba50ca2b9304642a784bbb.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-rivo-uniseg): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a9ab18c77c..64a9a764be 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7634,3 +7634,26 @@ projects.")
character or string.")
(license license:expat)))
+(define-public go-github-com-rivo-uniseg
+ (package
+ (name "go-github-com-rivo-uniseg")
+ (version "0.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rivo/uniseg.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0j7h22vfmjj562vr8gpsyrkrwp1pq9ayh5fylv24skxb467g9f0q"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/rivo/uniseg"))
+ (home-page "https://github.com/rivo/uniseg")
+ (synopsis "Unicode Text Segmentation for Go")
+ (description "This package implements Unicode Text Segmentation according
+to @url{https://unicode.org/reports/tr29/,Unicode Standard Annex #29}.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 24/28] gnu: Add go-github-com-shurcool-githubv4.
(address . 47539@debbugs.gnu.org)
c79c57948934fedf3e436710a94328000d1c2370.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-shurcool-githubv4): New variable.
---
gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 64a9a764be..ef0287ff29 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7657,3 +7657,35 @@ character or string.")
to @url{https://unicode.org/reports/tr29/,Unicode Standard Annex #29}.")
(license license:expat)))
+(define-public go-github-com-shurcool-githubv4
+ (package
+ (name "go-github-com-shurcool-githubv4")
+ (version "0.0.0-20201206200315-234843c633fa")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/shurcooL/githubv4.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jmmjv95vcm9vl5zpvwv77pq3mhf2j2vxc7pj75yfniymp2dh5mi"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/shurcooL/githubv4"))
+ (native-inputs
+ `(("go-github-com-shurcooL-graphql" ,go-github-com-shurcool-graphql)
+ ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)))
+ (home-page "https://github.com/shurcooL/githubv4")
+ (synopsis "Client library for accessing the GitHub GraphQL API v4")
+ (description "This package is a client library for accessing the GitHub
+GraphQL API v4. It focuses on the following things:
+
+@itemize
+@item Friendly, simple and powerful API.
+@item Correctness, high performance and efficiency.
+@item Support for all of GitHub GraphQL API v4 via code generation from schema.
+@end itemize")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 25/28] gnu: Add go-gopkg-in-yaml-v3.
(address . 47539@debbugs.gnu.org)
d00a03ff09ef4158003132f4e5d32f67bde1a93c.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-gopkg-in-yaml-v3): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ef0287ff29..5217bc383d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7689,3 +7689,29 @@ GraphQL API v4. It focuses on the following things:
@end itemize")
(license license:expat)))
+(define-public go-gopkg-in-yaml-v3
+ (package
+ (name "go-gopkg-in-yaml-v3")
+ (version "3.0.0-20210107192922-496545a6307b")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gopkg.in/yaml.v3")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g"))))
+ (build-system go-build-system)
+ (arguments '(#:import-path "gopkg.in/yaml.v3"))
+ (native-inputs
+ `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)))
+ (home-page "https://gopkg.in/yaml.v3")
+ (synopsis "YAML support for the Go language")
+ (description "This library enables Go programs to comfortably encode and
+decode YAML values. It is based on a pure Go port of the well-known libyaml C
+library to parse and generate YAML data quickly and reliably.")
+ (license (list license:expat
+ license:asl2.0))))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 26/28] gnu: Add go-github-com-shurcool-graphql.
(address . 47539@debbugs.gnu.org)
b70fd14127ad0a6e1ba272fc22c012108c2099fe.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-shurcool-graphql): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 5217bc383d..d6e5494c79 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7715,3 +7715,27 @@ library to parse and generate YAML data quickly and reliably.")
(license (list license:expat
license:asl2.0))))
+(define-public go-github-com-shurcool-graphql
+ (package
+ (name "go-github-com-shurcool-graphql")
+ (version "0.0.0-20200928012149-18c5c3165e3a")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/shurcooL/graphql.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0psxc2q3qsh1lfag11m2gz54fzzvlss5znyf34aars94igsjywzx"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/shurcooL/graphql"))
+ (native-inputs
+ `(("go-golang-org-x-net" ,go-golang-org-x-net)))
+ (home-page "https://github.com/shurcooL/graphql")
+ (synopsis "GraphQL client implementation")
+ (description "This package provides a GraphQL client implementation.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 27/28] gnu: Add go-github-com-cli-shurcool-graphql.
(address . 47539@debbugs.gnu.org)
98832289225dfe287e5abf5b3684cb58a4c7cd47.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-shurcool-graphql): New variable.
---
gnu/packages/golang.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (28 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index d6e5494c79..870a9628df 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7739,3 +7739,21 @@ library to parse and generate YAML data quickly and reliably.")
(description "This package provides a GraphQL client implementation.")
(license license:expat)))
+;; GitHub's fork of go-github-com-shurcool-graphql, used by the 'gh' CLI tool
+(define-public go-github-com-cli-shurcool-graphql
+ (package
+ (inherit go-github-com-shurcool-graphql)
+ (name "go-github-com-cli-shurcool-graphql")
+ ;; Use the commit from the 'named-queries' branch
+ (version "0.0.0-20200707151639-0f7232a2bf7e")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/shurcooL-graphql.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19dv1zprs9zv5gnwql29r7lym08gh2jwkz0w0f62823b57m1rjp6"))))
+ (home-page "https://github.com/cli/shurcooL-graphql")))
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 01/28] gnu: go-github-com-charmbracelet-glamour: Move some
(address . 47539@debbugs.gnu.org)
3e5341621af597390b962658d3ff89bdb8e510af.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm
(go-github-com-charmbracelet-glamour)[native-inputs]: Move some
packages from here...
[propagated-inputs]: ...to here.
---
gnu/packages/golang.scm | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index d9988cd7ad..05103e790f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5805,25 +5805,27 @@ which produce colorized output using github.com/fatih/color.")
(arguments
`(#:import-path "github.com/charmbracelet/glamour"))
(native-inputs
+ `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
+ ("go-github-com-muesli-termenv" ,go-github-com-muesli-termenv)
+ ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)))
+ ;; Needed for 'gh' to build
+ (propagated-inputs
`(("go-github-com-alecthomas-chroma" ,go-github-com-alecthomas-chroma)
+ ("go-github-com-google-goterm" ,go-github-com-google-goterm)
+ ("go-github-com-aymerick-douceur" ,go-github-com-aymerick-douceur)
("go-github-com-danwakefield-fnmatch" ,go-github-com-danwakefield-fnmatch)
- ("go-github-com-dlclark-regexp2" ,go-github-com-dlclark-regexp2)
- ("go-github-com-microcosm-cc-bluemonday" ,go-github-com-microcosm-cc-bluemonday)
("go-github-com-chris-ramon-douceur" ,go-github-com-chris-ramon-douceur)
- ("go-github-com-aymerick-douceur" ,go-github-com-aymerick-douceur)
("go-github-com-gorilla-css" ,go-github-com-gorilla-css)
+ ("go-golang-org-colorful" ,go-golang-org-colorful)
+ ("go-golang-org-x-net" ,go-golang-org-x-net)
("go-github-com-muesli-reflow-ansi" ,go-github-com-muesli-reflow-ansi)
+ ("go-github-com-microcosm-cc-bluemonday" ,go-github-com-microcosm-cc-bluemonday)
("go-github-com-muesli-reflow-wordwrap" ,go-github-com-muesli-reflow-wordwrap)
+ ("go-github-com-yuin-goldmark" ,go-github-com-yuin-goldmark)
+ ("go-github-com-dlclark-regexp2" ,go-github-com-dlclark-regexp2)
("go-github-com-muesli-reflow-indent" ,go-github-com-muesli-reflow-indent)
("go-github-com-muesli-reflow-padding" ,go-github-com-muesli-reflow-padding)
- ("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
- ("go-github-com-muesli-termenv" ,go-github-com-muesli-termenv)
- ("go-github-com-google-goterm" ,go-github-com-google-goterm)
- ("go-golang-org-colorful" ,go-golang-org-colorful)
- ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
- ("go-github-com-olekukonko-tablewriter" ,go-github-com-olekukonko-tablewriter)
- ("go-github-com-yuin-goldmark" ,go-github-com-yuin-goldmark)
- ("go-golang-org-x-net" ,go-golang-org-x-net)))
+ ("go-github-com-olekukonko-tablewriter" ,go-github-com-olekukonko-tablewriter)))
(home-page "https://github.com/charmbracelet/glamour/")
(synopsis "Write handsome command-line tools with glamour")
(description "@code{glamour} lets you render markdown documents and
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 04/28] gnu: Add go-github-com-kr-pty.
(address . 47539@debbugs.gnu.org)
be000c8f31d5aca11bc8978863ed5ed36c666b99.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-kr-pty): New variable.
---
This has been deprecated by upstream, but is needed to build 'gh'.

gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 60257ff84e..19b4d69bf7 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7082,3 +7082,28 @@ larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(description "Pty is a Go package for using Unix pseudo-terminals.")
(license license:expat)))
+;; Deprecated in favor of 'go-github-com-creack-pty', but needed by 'gh'
+(define-public go-github-com-kr-pty
+ (hidden-package
+ (package
+ (name "go-github-com-kr-pty")
+ (version "1.1.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kr/pty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "go-github-com-kr-pty" version))
+ (sha256
+ (base32
+ "1vcl6f90n0f8s8b4fyh0832ilybjqcypqyj233lqj1hx62fvgdbk"))))
+ (build-system go-build-system)
+ (arguments '(#:import-path "github.com/kr/pty"))
+ (propagated-inputs
+ `(("go-github-com-creack-pty" ,go-github-com-creack-pty)))
+ (home-page "https://github.com/kr/pty")
+ (synopsis "PTY interface for Go")
+ (description "Pty is a Go package for using Unix pseudo-terminals.")
+ (license license:expat))))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 02/28] gnu: Add go-github-com-hinshun-vt10x.
(address . 47539@debbugs.gnu.org)
a2c26b6f16f6159b19fb5ba6e86d8e46ed9f8584.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-hinshun-vt10x): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 05103e790f..52eb6e4882 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7036,3 +7036,27 @@ simplifications, and enforces style rules.")
"This package provides a library for fast, structured, leveled logging in
Go.")
(license license:expat)))
+
+(define-public go-github-com-hinshun-vt10x
+ (package
+ (name "go-github-com-hinshun-vt10x")
+ (version "0.0.0-20180809195222-d55458df857c")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hinshun/vt10x.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vwsp5iii7pf4na8pkd7cn3bawkwnsimkv1sysy7bslclg5jm370"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/hinshun/vt10x"))
+ (home-page "https://github.com/hinshun/vt10x")
+ (synopsis "vt10x terminal emulation backend")
+ (description "This package is a vt10x terminal emulation backend. It has
+larged been influenced by st, rxvt, xterm, and iTerm as reference.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 03/28] gnu: Add go-github-com-creack-pty.
(address . 47539@debbugs.gnu.org)
0a72209ba31b8ecf5d18b1a481ce3b0cacd6ae1d.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-creack-pty): New variable.
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 52eb6e4882..60257ff84e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7060,3 +7060,25 @@ Go.")
larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(license license:expat)))
+(define-public go-github-com-creack-pty
+ (package
+ (name "go-github-com-creack-pty")
+ (version "1.1.11")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/creack/pty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dwhch53vqxpnbiqvfa27cliabx9ma2m4dax4adlrz8rami4sakw"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/creack/pty"))
+ (home-page "https://github.com/creack/pty")
+ (synopsis "PTY interface for Go")
+ (description "Pty is a Go package for using Unix pseudo-terminals.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 05/28] gnu: Add go-github-com-netflix-go-expect.
(address . 47539@debbugs.gnu.org)
eeb393155ea06316ef0876d68d02a1fbedb3a9e7.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-netflix-go-expect): New variable.
---
gnu/packages/golang.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 19b4d69bf7..e2ab99a334 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7107,3 +7107,33 @@ larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(description "Pty is a Go package for using Unix pseudo-terminals.")
(license license:expat))))
+(define-public go-github-com-netflix-go-expect
+ (package
+ (name "go-github-com-netflix-go-expect")
+ (version "0.0.0-20201125194554-85d881c3777e")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Netflix/go-expect.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01s59hsdwy2nngngcgzyhncys56pdgzr6lff7k8kjrh26zk6pdv5"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/Netflix/go-expect"))
+ (native-inputs
+ `(("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-kr-pty" ,go-github-com-kr-pty)))
+ (home-page
+ "https://github.com/Netflix/go-expect")
+ (synopsis "Expect-like library to automate control of terminal programs")
+ (description "This package provides an expect-like interface to automate
+control of applications. It is unlike expect in that it does not spawn or
+manage process lifecycle. This package only focuses on expecting output and
+sending input through it's pseudoterminal.")
+ (license license:asl2.0)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 06/28] gnu: Add go-github-com-alecaivazis-survey-v2.
(address . 47539@debbugs.gnu.org)
a96f7de993c79c5a3d022ae354f7652901439db9.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-alecaivazis-survey-v2): New variable.
---
gnu/packages/golang.scm | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e2ab99a334..80befc8c45 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -62,6 +62,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages textutils)
+ #:use-module ((gnu packages syncthing) #:select (go-github-com-kballard-go-shellquote))
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (ice-9 match)
@@ -7137,3 +7138,51 @@ manage process lifecycle. This package only focuses on expecting output and
sending input through it's pseudoterminal.")
(license license:asl2.0)))
+(define-public go-github-com-alecaivazis-survey-v2
+ (package
+ (name "go-github-com-alecaivazis-survey-v2")
+ (version "2.2.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AlecAivazis/survey.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jw4ka44q7a2885fil4qnb56mdlixmy5ysd68i5h5dblbq4r61l1"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/AlecAivazis/survey"))
+ (native-inputs
+ `(("go-golang-org-x-text" ,go-golang-org-x-text)
+ ("go-golang-org-x-sys" ,go-golang-org-x-sys)
+ ("go-golang-org-x-crypto"
+ ,go-golang-org-x-crypto)
+ ("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-pmezard-go-difflib"
+ ,go-github-com-pmezard-go-difflib)
+ ("go-github-com-mgutz-ansi"
+ ,go-github-com-mgutz-ansi)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-kr-pty" ,go-github-com-kr-pty)
+ ("go-github-com-kballard-go-shellquote"
+ ,go-github-com-kballard-go-shellquote)
+ ("go-github-com-hinshun-vt10x"
+ ,go-github-com-hinshun-vt10x)
+ ("go-github-com-davecgh-go-spew"
+ ,go-github-com-davecgh-go-spew)
+ ("go-github-com-netflix-go-expect"
+ ,go-github-com-netflix-go-expect)))
+ (home-page
+ "https://github.com/AlecAivazis/survey")
+ (synopsis "Build interactive prompts on terminals")
+ (description "This is a library for building interactive prompts on
+terminals supporting ANSI escape sequences.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 07/28] gnu: Add go-github-com-makenowjust-heredoc.
(address . 47539@debbugs.gnu.org)
c14ec6734e02741e4a267589d81ce2d5cdc966df.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-makenowjust-heredoc): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 80befc8c45..9f8037218f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7186,3 +7186,27 @@ sending input through it's pseudoterminal.")
terminals supporting ANSI escape sequences.")
(license license:expat)))
+(define-public go-github-com-makenowjust-heredoc
+ (package
+ (name "go-github-com-makenowjust-heredoc")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/MakeNowJust/heredoc.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18f21zm8n2wlnkz1ylw8rcxmqxyv2rlz8749yfqggm2m0m2884pj"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/MakeNowJust/heredoc"))
+ (home-page
+ "https://github.com/MakeNowJust/heredoc")
+ (synopsis "Here-documents with keeping indent")
+ (description "This package provides the Here-document with keeping
+indent.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 08/28] gnu: Add go-github-com-briandowns-spinner.
(address . 47539@debbugs.gnu.org)
aa06bb0fa706a8a84a08c83ff1597b80b7e28b89.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-briandowns-spinner): New variable.
---
gnu/packages/golang.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9f8037218f..26cbd7edad 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7210,3 +7210,32 @@ terminals supporting ANSI escape sequences.")
indent.")
(license license:expat)))
+(define-public go-github-com-briandowns-spinner
+ (package
+ (name "go-github-com-briandowns-spinner")
+ (version "1.12.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/briandowns/spinner.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1n6h2iqq5anqg9p2pwz684vhfjx0944rrw53x2cn5m1dybp6rbwx"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/briandowns/spinner"))
+ (native-inputs
+ `(("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-fatih-color"
+ ,go-github-com-fatih-color)))
+ (home-page
+ "https://github.com/briandowns/spinner")
+ (synopsis "Progress indicator for any terminal application")
+ (description "This is a simple package to add a spinner or progress
+indicator to any terminal application. ")
+ (license license:asl2.0)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 09/28] gnu: Add go-github-com-cli-browser.
(address . 47539@debbugs.gnu.org)
5ecae063dc9ee26ef2158ecb4c6bfe07381fbe6d.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-browser): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 26cbd7edad..92ec492cc6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7239,3 +7239,28 @@ indent.")
indicator to any terminal application. ")
(license license:asl2.0)))
+(define-public go-github-com-cli-browser
+ (package
+ (name "go-github-com-cli-browser")
+ (version "1.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/browser.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "13z27cc0a184bhprspwclzbvrzsrfd5qyk5r2djfx5nm85igxr0n"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cli/browser"))
+ (native-inputs
+ `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
+ (home-page "https://github.com/cli/browser")
+ (synopsis "Helpers to open URLs, or files in the default web browser")
+ (description "This library provides helpers to open URLs, readers, or
+files in the system default web browser.")
+ (license license:bsd-2)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 10/28] gnu: Add go-github-com-cli-oauth.
(address . 47539@debbugs.gnu.org)
dfcd7cb245837f8794f9519322cc3edbf6413d1d.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-oauth): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 92ec492cc6..a2c203dafa 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7264,3 +7264,29 @@ indicator to any terminal application. ")
files in the system default web browser.")
(license license:bsd-2)))
+(define-public go-github-com-cli-oauth
+ (package
+ (name "go-github-com-cli-oauth")
+ (version "0.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/oauth.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1b96cl53qc40xsgpxpy9qkrib4a4g02a4sq442qp8749qab5ljhs"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cli/oauth"))
+ (native-inputs
+ `(("go-github-com-cli-browser"
+ ,go-github-com-cli-browser)))
+ (home-page "https://github.com/cli/oauth")
+ (synopsis "Perform OAuth Device flow and Web application flow in Go")
+ (description "This is a library for performing OAuth Device flow and Web
+application flow in Go client apps.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 11/28] gnu: Add go-github-com-cli-safeexec.
(address . 47539@debbugs.gnu.org)
0d07c0f083ab03cfd14058365fa8434ed5421f85.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-safeexec): New variable.
---
This is only used on Windows, but is needed by the 'gh' package so it is
marked as hidden.

gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a2c203dafa..9265083978 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7290,3 +7290,28 @@ files in the system default web browser.")
application flow in Go client apps.")
(license license:expat)))
+;; Needed by the 'gh' GitHub CLI tool
+(define-public go-github-com-cli-safeexec
+ (hidden-package
+ (package
+ (name "go-github-com-cli-safeexec")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/safeexec.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1q80va3721dyw33lrnv7x3gd66kcnbsm38dv3lk7xqhii2adawmk"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cli/safeexec"))
+ (home-page "https://github.com/cli/safeexec")
+ (synopsis "Safer alternative to exec.LookPath() on Windows")
+ (description "This library provides a safer alternative to
+@code{exec.LookPath()} on Windows.")
+ (license license:bsd-2))))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 12/28] gnu: Add go-github-com-russross-blackfriday-v2.
(address . 47539@debbugs.gnu.org)
104cd4b2728027839421965bd3e3244c1f0b6d39.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-russross-blackfriday-v2): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9265083978..c7f2cd7083 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7315,3 +7315,29 @@ application flow in Go client apps.")
@code{exec.LookPath()} on Windows.")
(license license:bsd-2))))
+(define-public go-github-com-russross-blackfriday-v2
+ (package
+ (name "go-github-com-russross-blackfriday-v2")
+ (version "2.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/russross/blackfriday.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0d1rg1drrfmabilqjjayklsz5d0n3hkf979sr3wsrw92bfbkivs7"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/russross/blackfriday"))
+ (home-page
+ "https://github.com/russross/blackfriday")
+ (synopsis "Markdown processor implemented in Go")
+ (description "Blackfriday is a Markdown processor implemented in Go. It
+is paranoid about its input (so you can safely feed it user-supplied data), it
+is fast, it supports common extensions (tables, smart punctuation
+substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
+ (license license:bsd-2)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 13/28] gnu: Add go-github-com-shurcool-sanitized-anchor-name.
(address . 47539@debbugs.gnu.org)
5fb9a7349d3e62ca5701c150d5a05e6d0ee4798b.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-shurcool-sanitized-anchor-name): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c7f2cd7083..adeaa7e88d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7341,3 +7341,29 @@ is fast, it supports common extensions (tables, smart punctuation
substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
(license license:bsd-2)))
+(define-public go-github-com-shurcool-sanitized-anchor-name
+ (package
+ (name "go-github-com-shurcool-sanitized-anchor-name")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/shurcooL/sanitized_anchor_name.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gv9p2nr46z80dnfjsklc6zxbgk96349sdsxjz05f3z6wb6m5l8f"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/shurcooL/sanitized_anchor_name"))
+ (home-page
+ "https://github.com/shurcooL/sanitized_anchor_name")
+ (synopsis "Create sanitized anchor names")
+ (description "This package provides a function to create sanitized anchor
+names. Its logic can be reused by multiple packages to create interoperable
+anchor names and links to those anchors.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 14/28] gnu: Add go-github-com-cpuguy83-go-md2man-v2.
(address . 47539@debbugs.gnu.org)
6b4202e3d8a28317e4e28b29dcfeac41b38ba73d.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cpuguy83-go-md2man-v2): New variable.
---
gnu/packages/golang.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index adeaa7e88d..1ba938715e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7367,3 +7367,33 @@ names. Its logic can be reused by multiple packages to create interoperable
anchor names and links to those anchors.")
(license license:expat)))
+(define-public go-github-com-cpuguy83-go-md2man-v2
+ (package
+ (name "go-github-com-cpuguy83-go-md2man-v2")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cpuguy83/go-md2man.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0r1f7v475dxxgzqci1mxfliwadcrk86ippflx9n411325l4g3ghv"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cpuguy83/go-md2man"))
+ (native-inputs
+ `(("go-github-com-shurcool-sanitized-anchor-name"
+ ,go-github-com-shurcool-sanitized-anchor-name)
+ ("go-github-com-russross-blackfriday-v2"
+ ,go-github-com-russross-blackfriday-v2)
+ ("go-github-com-pmezard-go-difflib"
+ ,go-github-com-pmezard-go-difflib)))
+ (home-page
+ "https://github.com/cpuguy83/go-md2man")
+ (synopsis "Convert Markdown into Man pages")
+ (description "This package converts Markdown into Roff Man pages.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 18/28] gnu: Add go-github-com-henvic-httpretty.
(address . 47539@debbugs.gnu.org)
e77415d8f9abe0ebf26c19c9ec3c29776ab84441.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-henvic-httpretty): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index fafe3fc226..7a2abc92f9 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7490,3 +7490,26 @@ based on magic numbers. Features include
shell-style quoting, commenting, and escaping.")
(license license:asl2.0)))
+(define-public go-github-com-henvic-httpretty
+ (package
+ (name "go-github-com-henvic-httpretty")
+ (version "0.0.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/henvic/httpretty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jbnj1x8wribayx65ssxigs9p88pi0cxg36h8qhqvqz1pqiygksa"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/henvic/httpretty"))
+ (home-page "https://github.com/henvic/httpretty")
+ (synopsis "Print the HTTP requests you make on your terminal")
+ (description "This packages prints the HTTP requests you make with Go
+pretty on your terminal.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 19/28] gnu: Add go-github-com-itchyny-go-flags.
(address . 47539@debbugs.gnu.org)
ce9d780257033f83a71e527bf603e0b8812b5001.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-go-flags): New variable.
---
gnu/packages/golang.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 7a2abc92f9..2750443484 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7513,3 +7513,36 @@ shell-style quoting, commenting, and escaping.")
pretty on your terminal.")
(license license:expat)))
+(define-public go-github-com-itchyny-go-flags
+ (package
+ (name "go-github-com-itchyny-go-flags")
+ (version "1.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/go-flags.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0qfh7gn95aldlsigk72jl87npmwvx15kb7df1100d6j0nbakd8b5"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/itchyny/go-flags"
+ ;; Unable to find man page
+ #:tests? #f))
+ (native-inputs
+ `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
+ (home-page "https://github.com/itchyny/go-flags")
+ (synopsis "Go library for parsing command line arguments")
+ (description "This library provides similar functionality to the builtin
+flag library of Go, but provides much more functionality.
+
+Package flags provides an extensive command line option parser. The flags
+package is similar in functionality to the go builtin flag package but
+provides more options and uses reflection to provide a convenient and succinct
+way of specifying command line options.")
+ (license license:bsd-3)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 15/28] gnu: Add go-github-com-enescakir-emoji.
(address . 47539@debbugs.gnu.org)
64d20b5bd312abb6fa16d3f7d381247488be5f6f.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-enescakir-emoji): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1ba938715e..11eb330d6d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7397,3 +7397,26 @@ anchor names and links to those anchors.")
(description "This package converts Markdown into Roff Man pages.")
(license license:expat)))
+(define-public go-github-com-enescakir-emoji
+ (package
+ (name "go-github-com-enescakir-emoji")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/enescakir/emoji.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1xnisfsn94izcjhl4xywd971av4b5v1n67figp16wh443lhihxky"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/enescakir/emoji"))
+ (home-page "https://github.com/enescakir/emoji")
+ (synopsis "Minimalistic emoji package for Go")
+ (description "This package provides a minimalistic emoji library for
+Go. It lets you use emoji characters in strings.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 28/28] gnu: Add gh.
(address . 47539@debbugs.gnu.org)
778a56cd9ac0c4b1efeb7d27c35bf40663ee28fd.1617262223.git.public@yoctocell.xyz
* gnu/packages/version-control.scm (gh): New variable.
---
gnu/packages/version-control.scm | 92 ++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)

Toggle diff (112 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index e7fa6e6777..1d3f8d1b7c 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -118,6 +118,7 @@
#:use-module (gnu packages sdl)
#:use-module (gnu packages swig)
#:use-module (gnu packages sync)
+ #:use-module ((gnu packages syncthing) #:select (go-github-com-kballard-go-shellquote))
#:use-module (gnu packages tcl)
#:use-module (gnu packages textutils)
#:use-module (gnu packages time)
@@ -3021,6 +3022,97 @@ commit message side by side
If several repos are related, it helps to see their status together.")
(license license:expat))))
+(define-public gh
+ (package
+ (name "gh")
+ (version "1.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/cli.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "009jh1i1ji7d773ismifdw4qvwlb8s1zn14d0n84j9h3n0hyynbc"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/cli/cli/cmd/gh"
+ #:unpack-path
+ "github.com/cli/cli"))
+ (native-inputs
+ `(("go" ,go)))
+ (inputs
+ `(("go-github-com-cli-shurcool-graphql"
+ ,go-github-com-cli-shurcool-graphql)
+ ("go-gopkg-in-yaml-v3" ,go-gopkg-in-yaml-v3)
+ ("go-golang-org-x-text" ,go-golang-org-x-text)
+ ("go-golang-org-x-sync" ,go-golang-org-x-sync)
+ ("go-golang-org-x-crypto"
+ ,go-golang-org-x-crypto)
+ ("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-spf13-pflag"
+ ,go-github-com-spf13-pflag)
+ ("go-github-com-spf13-cobra"
+ ,go-github-com-spf13-cobra)
+ ("go-github-com-shurcool-githubv4"
+ ,go-github-com-shurcool-githubv4)
+ ("go-github-com-rivo-uniseg"
+ ,go-github-com-rivo-uniseg)
+ ("go-github-com-muesli-termenv"
+ ,go-github-com-muesli-termenv)
+ ("go-github-com-mitchellh-go-homedir"
+ ,go-github-com-mitchellh-go-homedir)
+ ("go-github-com-mgutz-ansi"
+ ,go-github-com-mgutz-ansi)
+ ("go-github-com-mattn-go-runewidth"
+ ,go-github-com-mattn-go-runewidth)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-kballard-go-shellquote"
+ ,go-github-com-kballard-go-shellquote)
+ ("go-github-com-itchyny-gojq"
+ ,go-github-com-itchyny-gojq)
+ ("go-github-com-henvic-httpretty"
+ ,go-github-com-henvic-httpretty)
+ ("go-github-com-hashicorp-go-version"
+ ,go-github-com-hashicorp-go-version)
+ ("go-github-com-google-shlex"
+ ,go-github-com-google-shlex)
+ ("go-github-com-google-go-cmp-cmp"
+ ,go-github-com-google-go-cmp-cmp)
+ ("go-github-com-gabriel-vasile-mimetype"
+ ,go-github-com-gabriel-vasile-mimetype)
+ ("go-github-com-enescakir-emoji"
+ ,go-github-com-enescakir-emoji)
+ ("go-github-com-cpuguy83-go-md2man-v2"
+ ,go-github-com-cpuguy83-go-md2man-v2)
+ ("go-github-com-cli-safeexec"
+ ,go-github-com-cli-safeexec)
+ ("go-github-com-cli-oauth"
+ ,go-github-com-cli-oauth)
+ ("go-github-com-cli-browser"
+ ,go-github-com-cli-browser)
+ ("go-github-com-briandowns-spinner"
+ ,go-github-com-briandowns-spinner)
+ ("go-github-com-makenowjust-heredoc"
+ ,go-github-com-makenowjust-heredoc)
+ ("go-github-com-alecaivazis-survey-v2"
+ ,go-github-com-alecaivazis-survey-v2)
+ ("go-github-com-charmbracelet-glamour"
+ ,go-github-com-charmbracelet-glamour)))
+ (home-page "https://github.com/cli/cli")
+ (synopsis "GitHub CLI tool")
+ (description "@command{gh} is GitHub on the command line. It brings pull
+requests, issues, and other GitHub concepts to the terminal next to where you
+are already working with Git and your code.")
+ (license license:expat)))
+
(define-public ghq
(package
(name "ghq")
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 16/28] gnu: Add go-github-com-gabriel-vasile-mimetype.
(address . 47539@debbugs.gnu.org)
547d56b310ce40416b8d895b92f461711e5696f4.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-gabriel-vasile-mimetype): New variable.
---
gnu/packages/golang.scm | 47 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 11eb330d6d..8e942fa955 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7420,3 +7420,50 @@ anchor names and links to those anchors.")
Go. It lets you use emoji characters in strings.")
(license license:expat)))
+(define-public go-github-com-gabriel-vasile-mimetype
+ (package
+ (name "go-github-com-gabriel-vasile-mimetype")
+ (version "1.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gabriel-vasile/mimetype.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ysb0pjhyr9b7q2y39b5hpwsaidgfl42gd07yj34mgmb9wfjb7ch"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/gabriel-vasile/mimetype"
+ ;; FIXME: Cannot open 'supported_mimes.md'
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; The files are read-only
+ (add-before 'reset-gzip-timestamps 'make-gz-files-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each make-file-writable
+ (find-files (string-append (assoc-ref outputs "out"))
+ ".*\\.gz$"))
+ #t)))))
+
+ (home-page
+ "https://github.com/gabriel-vasile/mimetype")
+ (synopsis "A fast golang library for MIME type and file extension detection")
+ (description "This is a package for detecting MIME types and extensions
+based on magic numbers. Features include
+
+@itemize
+@item fast and precise MIME type and file extension detection
+@item long list of supported MIME types
+@item common file formats are prioritized
+@item small and simple API
+@item handles MIME type aliases
+@item thread safe
+@item low memory usage, besides the file header
+@end itemize")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 10:02
[PATCH 17/28] gnu: Add go-github-com-google-shlex.
(address . 47539@debbugs.gnu.org)
8042622f663d83e5b6b282d4c4eb19d2044b32e6.1617262223.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-google-shlex): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8e942fa955..fafe3fc226 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7467,3 +7467,26 @@ based on magic numbers. Features include
@end itemize")
(license license:expat)))
+(define-public go-github-com-google-shlex
+ (package
+ (name "go-github-com-google-shlex")
+ (version "0.0.0-20191202100458-e7afc7fbc510")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/shlex.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "14z8hqyik910wk2qwnzgz8mjsmiamxa0pj55ahbv0jx6j3dgvzfm"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/google/shlex"))
+ (home-page "https://github.com/google/shlex")
+ (synopsis "Simple lexer for Go")
+ (description "This library provides is a simple lexer for Go that supports
+shell-style quoting, commenting, and escaping.")
+ (license license:asl2.0)))
+
--
2.31.1
L
L
Leo Prikler wrote on 1 Apr 2021 12:08
Re: [PATCH 00/28] Add gh and dependencies
7f41ded1648030ed8f4db3165bfe4ccb2cb6b2a9.camel@student.tugraz.at
Hi,

Am Donnerstag, den 01.04.2021, 09:51 +0200 schrieb Xinglu Chen:
Toggle quote (3 lines)
> This patchset adds the 'gh' package, a CLI interface to GitHub. The
> Go
> importer did most of the work. :)
I am not experienced with Go, so I can't comment on the rest too much,
but I wanted to point out, that single, double and triple letter
packages are (imo rightly) frowned upon in the Guix project.
Considering, that this is the *official* Github CLI tool, a name like
"github-cli" would probably make more sense here.

Toggle quote (7 lines)
> Some things to note:
>
> - When building'gh', I couldn't get
> 'go-github-com-charmbracelet-glamour' to build without moving some
> native-inputs to propagated-inputs, though, if I was only building
> 'go-github-com-charmbracelet-glamour' it would build without moving
> things to propagated-inputs. I am not sure why this happens.
Perhaps you need to add those native inputs as native inputs to gh as
well? Try adding its native inputs to gh and see whether that changes
something.

Toggle quote (5 lines)
> - I found that (gnu packages syncthing) contained quite a few Go
> packages, I think it would make sense to move those packages to
> (gnu
> packages golang), and move the Syncthing package to (gnu packages
> sync). This would be done in a separate commit though.
Indeed, that should probably done in a separate set.

Toggle quote (6 lines)
> - The patch marked with 'D' adds a package which has been deprecated
> by
> upstream, but it is still needed by one of the packages that 'gh'
> depend on. I have marked it as a hidden package, let me know if
> this
> is the right decision.
Yes, we do so for other packages as well, that require outdated or
otherwise modified versions, that should not show up in user profiles
unless they really, really want to and use manifests to achieve their
goals.

Toggle quote (5 lines)
> - The patch marked with 'W' adds a package which is needed by 'gh',
> but
> only used on Windows. It is still Free Software (BSD-2), but I
> have
> also marked it as hidden.
This is at least in some sense an acceptable workaround, but how large
would the effort be to outright drop references to this package, given
that it's already not "actively" being used?

Regards,
Leo
X
X
Xinglu Chen wrote on 1 Apr 2021 16:49
87czve3vrg.fsf@yoctocell.xyz
On Thu, Apr 01 2021, Leo Prikler wrote:

Toggle quote (11 lines)
> Hi,
>
> Am Donnerstag, den 01.04.2021, 09:51 +0200 schrieb Xinglu Chen:
>> This patchset adds the 'gh' package, a CLI interface to GitHub. The
>> Go importer did most of the work. :)
> I am not experienced with Go, so I can't comment on the rest too much,
> but I wanted to point out, that single, double and triple letter
> packages are (imo rightly) frowned upon in the Guix project.
> Considering, that this is the *official* Github CLI tool, a name like
> "github-cli" would probably make more sense here.

Oh yeah, I saw the thread on guix-devel, I should have thought of this.

Toggle quote (9 lines)
>> - When building'gh', I couldn't get
>> 'go-github-com-charmbracelet-glamour' to build without moving some
>> native-inputs to propagated-inputs, though, if I was only building
>> 'go-github-com-charmbracelet-glamour' it would build without moving
>> things to propagated-inputs. I am not sure why this happens.
> Perhaps you need to add those native inputs as native inputs to gh as
> well? Try adding its native inputs to gh and see whether that changes
> something.

I will try and report back.

Toggle quote (9 lines)
>> - The patch marked with 'D' adds a package which has been deprecated
>> by upstream, but it is still needed by one of the packages that 'gh'
>> depend on. I have marked it as a hidden package, let me know if this
>> is the right decision.
> Yes, we do so for other packages as well, that require outdated or
> otherwise modified versions, that should not show up in user profiles
> unless they really, really want to and use manifests to achieve their
> goals.

Good to know, I will have to mark 'go-github-com-cli-shurcool-graphql'
as hidden as well since it's GitHubs' fork of
'go-github-com-shurcool-graphql' and most likely only used by 'gh'.

Toggle quote (7 lines)
>> - The patch marked with 'W' adds a package which is needed by 'gh',
>> but only used on Windows. It is still Free Software (BSD-2), but I
>> have also marked it as hidden.
> This is at least in some sense an acceptable workaround, but how large
> would the effort be to outright drop references to this package, given
> that it's already not "actively" being used?

I am not familiar with the Go ecosystem so I don't know if this will be
possible, but I will look into it.

Thank you for the rewiew!
L
L
Leo Prikler wrote on 1 Apr 2021 18:20
b56cb21fbd22a3b4c62de8baef25a3a1822389db.camel@student.tugraz.at
Hi,
Am Donnerstag, den 01.04.2021, 16:49 +0200 schrieb Xinglu Chen:
Toggle quote (18 lines)
> > > - The patch marked with 'D' adds a package which has been
> > > deprecated
> > > by upstream, but it is still needed by one of the packages that
> > > 'gh'
> > > depend on. I have marked it as a hidden package, let me know
> > > if this
> > > is the right decision.
> > Yes, we do so for other packages as well, that require outdated or
> > otherwise modified versions, that should not show up in user
> > profiles
> > unless they really, really want to and use manifests to achieve
> > their
> > goals.
>
> Good to know, I will have to mark 'go-github-com-cli-shurcool-
> graphql'
> as hidden as well since it's GitHubs' fork of
> 'go-github-com-shurcool-graphql' and most likely only used by 'gh'.
Just to clarify, I don't think that hiding will be necessary for this
package (since it differs by name), but it might still be a good idea
to hide it if you have a justification for doing so. That said, your
judgement on this matter is probably going to be better than mine.

Regards,
Leo
X
X
Xinglu Chen wrote on 1 Apr 2021 18:25
Re: [bug#47539] [PATCH 00/28] Add gh and dependencies
877dlm3rak.fsf@yoctocell.xyz
On Thu, Apr 01 2021, Xinglu Chen wrote:

Toggle quote (11 lines)
>>> - When building'gh', I couldn't get
>>> 'go-github-com-charmbracelet-glamour' to build without moving some
>>> native-inputs to propagated-inputs, though, if I was only building
>>> 'go-github-com-charmbracelet-glamour' it would build without moving
>>> things to propagated-inputs. I am not sure why this happens.
>> Perhaps you need to add those native inputs as native inputs to gh as
>> well? Try adding its native inputs to gh and see whether that changes
>> something.
>
> I will try and report back.

Adding the packages as native-inputs for github-cli fixed the problem.
Thank you!

Toggle quote (10 lines)
>>> - The patch marked with 'W' adds a package which is needed by 'gh',
>>> but only used on Windows. It is still Free Software (BSD-2), but I
>>> have also marked it as hidden.
>> This is at least in some sense an acceptable workaround, but how large
>> would the effort be to outright drop references to this package, given
>> that it's already not "actively" being used?
>
> I am not familiar with the Go ecosystem so I don't know if this will be
> possible, but I will look into it.

Compiling github-cli without the package doesn't work, and the package
is used in multiple places in the source code. I don't really know what
we can do here. Should I open an issue on their GitHub page, or just
leave it as is?
L
L
Leo Prikler wrote on 1 Apr 2021 18:47
ccf4a684d4ea9a91d51e3dc8ce70fd6152707ea0.camel@student.tugraz.at
Am Donnerstag, den 01.04.2021, 18:25 +0200 schrieb Xinglu Chen:
Toggle quote (21 lines)
> On Thu, Apr 01 2021, Xinglu Chen wrote:
>
> > > > - When building'gh', I couldn't get
> > > > 'go-github-com-charmbracelet-glamour' to build without moving
> > > > some
> > > > native-inputs to propagated-inputs, though, if I was only
> > > > building
> > > > 'go-github-com-charmbracelet-glamour' it would build without
> > > > moving
> > > > things to propagated-inputs. I am not sure why this happens.
> > > Perhaps you need to add those native inputs as native inputs to
> > > gh as
> > > well? Try adding its native inputs to gh and see whether that
> > > changes
> > > something.
> >
> > I will try and report back.
>
> Adding the packages as native-inputs for github-cli fixed the
> problem.
> Thank you!
You're welcome.

Toggle quote (21 lines)
> > > > - The patch marked with 'W' adds a package which is needed by
> > > > 'gh',
> > > > but only used on Windows. It is still Free Software (BSD-2),
> > > > but I
> > > > have also marked it as hidden.
> > > This is at least in some sense an acceptable workaround, but how
> > > large
> > > would the effort be to outright drop references to this package,
> > > given
> > > that it's already not "actively" being used?
> >
> > I am not familiar with the Go ecosystem so I don't know if this
> > will be
> > possible, but I will look into it.
>
> Compiling github-cli without the package doesn't work, and the
> package
> is used in multiple places in the source code. I don't really know
> what
> we can do here. Should I open an issue on their GitHub page, or just
> leave it as is?
For now, I don't think this is going to be a blocking issue, as long as
the package and the input are appropriately marked, e.g. with comments,
and we make sure not to endorse the Microsoft OS through them.
As to how we might handle this, we could do our own investigations into
dropping the dependency, but asking a question (make sure to tag it as
such) should work as well. Also be clear, that the goal is not
necessarily to remove the dependency altogether, but rather make it an
optional one.

After doing some quick investigations myself, I think the following
pair of substitute*s might work:
(("github.com/cli/safeexec") "os/exec")
(("safeexec") "exec")

Regards,
Leo
J
J
Jack Hill wrote on 1 Apr 2021 19:21
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
alpine.DEB.2.21.2104011305050.8138@marsh.hcoop.net
On Thu, 1 Apr 2021, Leo Prikler wrote:

Toggle quote (5 lines)
> After doing some quick investigations myself, I think the following
> pair of substitute*s might work:
> (("github.com/cli/safeexec") "os/exec")
> (("safeexec") "exec")

I happened to be reading the Go blog post about command path security [0].
I haven't looked at it very closely, but I'm hopeful that future gh
versions may be able to get safeexec-like behavior from the Go standard
library.


Best,
Jack
X
X
Xinglu Chen wrote on 1 Apr 2021 20:05
871rbt519u.fsf@yoctocell.xyz
On Thu, Apr 01 2021, Leo Prikler wrote:

Toggle quote (18 lines)
>> Compiling github-cli without the package doesn't work, and the
>> package is used in multiple places in the source code. I don't
>> really know what we can do here. Should I open an issue on their
>> GitHub page, or just leave it as is?
> For now, I don't think this is going to be a blocking issue, as long as
> the package and the input are appropriately marked, e.g. with comments,
> and we make sure not to endorse the Microsoft OS through them.
> As to how we might handle this, we could do our own investigations into
> dropping the dependency, but asking a question (make sure to tag it as
> such) should work as well. Also be clear, that the goal is not
> necessarily to remove the dependency altogether, but rather make it an
> optional one.
>
> After doing some quick investigations myself, I think the following
> pair of substitute*s might work:
> (("github.com/cli/safeexec") "os/exec")
> (("safeexec") "exec")

Thank you for the pointer, I managed to get it to work with the
following snippet:

#+begin_src scheme
(add-after 'unpack 'remove-safeexec
(lambda* (#:key outputs #:allow-other-keys)
(let ((prefix-file (lambda (file)
(string-append "src/github.com/cli/cli/" file))))
;; 'github.com/cli/safeexec' is only used for Windows, we
;; replace it with the regular 'os/exec'. See
(substitute* (map prefix-file
'("pkg/cmd/alias/expand/expand.go"
"script/build.go"))
(("github.com/cli/safeexec") "os/exec")
(("safeexec") "exec"))
;; These files have already imported 'os/exec', meaning that
;; 'os/exec' would get imported twice, causing an error.
;; Instead, we just remove the 'github.com/cli/safeexec'.
(substitute* (map prefix-file
'("cmd/gh/main.go"
"git/git.go"
"pkg/iostreams/iostreams.go"
"pkg/cmd/auth/shared/ssh_keys.go"
"pkg/cmd/pr/checkout/checkout.go"
"pkg/cmdutil/web_browser.go"
"pkg/surveyext/editor_manual.go"))
(("\"github.com/cli/safeexec\"") "")
(("safeexec") "exec")))))
#+end_src

I also used it to open an issue and everything worked as expected.
L
L
Leo Prikler wrote on 1 Apr 2021 20:10
ed90b9073694d7d9e858cc46650c0a7a25b19866.camel@student.tugraz.at
Am Donnerstag, den 01.04.2021, 20:05 +0200 schrieb Xinglu Chen:
Toggle quote (60 lines)
> On Thu, Apr 01 2021, Leo Prikler wrote:
>
> > > Compiling github-cli without the package doesn't work, and the
> > > package is used in multiple places in the source code. I don't
> > > really know what we can do here. Should I open an issue on their
> > > GitHub page, or just leave it as is?
> > For now, I don't think this is going to be a blocking issue, as
> > long as
> > the package and the input are appropriately marked, e.g. with
> > comments,
> > and we make sure not to endorse the Microsoft OS through them.
> > As to how we might handle this, we could do our own investigations
> > into
> > dropping the dependency, but asking a question (make sure to tag it
> > as
> > such) should work as well. Also be clear, that the goal is not
> > necessarily to remove the dependency altogether, but rather make it
> > an
> > optional one.
> >
> > After doing some quick investigations myself, I think the following
> > pair of substitute*s might work:
> > (("github.com/cli/safeexec") "os/exec")
> > (("safeexec") "exec")
>
> Thank you for the pointer, I managed to get it to work with the
> following snippet:
>
> #+begin_src scheme
> (add-after 'unpack 'remove-safeexec
> (lambda* (#:key outputs #:allow-other-keys)
> (let ((prefix-file (lambda (file)
> (string-append "src/github.com/cli/cli/"
> file))))
> ;; 'github.com/cli/safeexec' is only used for Windows,
> we
> ;; replace it with the regular 'os/exec'. See
> ;; <https://issues.guix.gnu.org/47539> for discussion.
> (substitute* (map prefix-file
> '("pkg/cmd/alias/expand/expand.go"
> "script/build.go"))
> (("github.com/cli/safeexec") "os/exec")
> (("safeexec") "exec"))
> ;; These files have already imported 'os/exec',
> meaning that
> ;; 'os/exec' would get imported twice, causing an
> error.
> ;; Instead, we just remove the
> 'github.com/cli/safeexec'.
> (substitute* (map prefix-file
> '("cmd/gh/main.go"
> "git/git.go"
> "pkg/iostreams/iostreams.go"
> "pkg/cmd/auth/shared/ssh_keys.go"
> "pkg/cmd/pr/checkout/checkout.go"
> "pkg/cmdutil/web_browser.go"
> "pkg/surveyext/editor_manual.go"))
> (("\"github.com/cli/safeexec\"") "")
> (("safeexec") "exec")))))
> #+end_src
This should probably be implemented with directory excursions, but
other than that if it works for you, then LGTM :)
X
X
Xinglu Chen wrote on 1 Apr 2021 20:16
Re: [bug#47539] [PATCH 00/28] Add gh and dependencies
87y2e13m6s.fsf@yoctocell.xyz
On Thu, Apr 01 2021, Leo Prikler wrote:

Toggle quote (40 lines)
> Am Donnerstag, den 01.04.2021, 20:05 +0200 schrieb Xinglu Chen:
>>
>> Thank you for the pointer, I managed to get it to work with the
>> following snippet:
>>
>> #+begin_src scheme
>> (add-after 'unpack 'remove-safeexec
>> (lambda* (#:key outputs #:allow-other-keys)
>> (let ((prefix-file (lambda (file)
>> (string-append "src/github.com/cli/cli/"
>> file))))
>> ;; 'github.com/cli/safeexec' is only used for Windows,
>> we
>> ;; replace it with the regular 'os/exec'. See
>> ;; <https://issues.guix.gnu.org/47539> for discussion.
>> (substitute* (map prefix-file
>> '("pkg/cmd/alias/expand/expand.go"
>> "script/build.go"))
>> (("github.com/cli/safeexec") "os/exec")
>> (("safeexec") "exec"))
>> ;; These files have already imported 'os/exec',
>> meaning that
>> ;; 'os/exec' would get imported twice, causing an
>> error.
>> ;; Instead, we just remove the
>> 'github.com/cli/safeexec'.
>> (substitute* (map prefix-file
>> '("cmd/gh/main.go"
>> "git/git.go"
>> "pkg/iostreams/iostreams.go"
>> "pkg/cmd/auth/shared/ssh_keys.go"
>> "pkg/cmd/pr/checkout/checkout.go"
>> "pkg/cmdutil/web_browser.go"
>> "pkg/surveyext/editor_manual.go"))
>> (("\"github.com/cli/safeexec\"") "")
>> (("safeexec") "exec")))))
>> #+end_src
> This should probably be implemented with directory excursions, but
> other than that if it works for you, then LGTM :)

Ah, I didn't know about that. Thanks for pointing this out. :)
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 19/26] gnu: Add go-github-com-itchyny-gojq.
(address . 47539@debbugs.gnu.org)
59be9d205cd56f067f8680d2658c26a16b49629e.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-gojq): New variable.
---
gnu/packages/golang.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9023816f59..35187a9bb8 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7543,3 +7543,41 @@ way of specifying command line options.")
date time strings.")
(license license:expat)))
+(define-public go-github-com-itchyny-gojq
+ (package
+ (name "go-github-com-itchyny-gojq")
+ (version "0.12.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/gojq.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pxm341sgqkscwifpxlkvchz8ix3wivp80p59dv257kaa9diymgz"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/itchyny/gojq"))
+ (native-inputs
+ `(("go-gopkg-in-yaml-v3" ,go-gopkg-in-yaml-v3)
+ ("go-golang-org-x-sys" ,go-golang-org-x-sys)
+ ("go-github-com-mattn-go-runewidth"
+ ,go-github-com-mattn-go-runewidth)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-itchyny-go-flags"
+ ,go-github-com-itchyny-go-flags)
+ ("go-github-com-google-go-cmp-cmp"
+ ,go-github-com-google-go-cmp-cmp)))
+ (propagated-inputs
+ `(("go-github-com-itchyny-timefmt-go"
+ ,go-github-com-itchyny-timefmt-go)))
+ (home-page "https://github.com/itchyny/gojq")
+ (synopsis "Pure Go implementation of jq")
+ (description "This package provides an implementation of @command{jq}
+command written in Go language. It is also embedable as a library to other Go
+projects.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 18/26] gnu: Add go-github-com-itchyny-timefmt-go.
(address . 47539@debbugs.gnu.org)
abb88565682f075d1be56c2778502d6bae4fbb7b.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-timefmt-go): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 6707b15273..9023816f59 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7519,3 +7519,27 @@ provides more options and uses reflection to provide a convenient and succinct
way of specifying command line options.")
(license license:bsd-3)))
+(define-public go-github-com-itchyny-timefmt-go
+ (package
+ (name "go-github-com-itchyny-timefmt-go")
+ (version "0.1.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/timefmt-go.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hfpvmbmzp5zbzz84p030jzd00jclnf4zr16f9r5bbq7xlhncj0z"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/itchyny/timefmt-go"))
+ (home-page
+ "https://github.com/itchyny/timefmt-go")
+ (synopsis "Efficient time formatting library for Go")
+ (description "This package provides functions for formatting and parsing
+date time strings.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 20/26] gnu: Add go-github-com-mattn-go-runewidth.
(address . 47539@debbugs.gnu.org)
bbeb7277b448822c47d10ec8317d9e1d825556d2.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-mattn-go-runewidth): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 35187a9bb8..c86a78cc98 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7581,3 +7581,29 @@ command written in Go language. It is also embedable as a library to other Go
projects.")
(license license:expat)))
+(define-public go-github-com-mattn-go-runewidth
+ (package
+ (name "go-github-com-mattn-go-runewidth")
+ (version "0.0.10")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mattn/go-runewidth.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jh9552ppqvkdfni7x623n0x5mbiaqqhjhmr0zkh28x56k4ysii4"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/mattn/go-runewidth"))
+ (native-inputs
+ `(("go-github-com-rivo-uniseg"
+ ,go-github-com-rivo-uniseg)))
+ (home-page "https://github.com/mattn/go-runewidth")
+ (synopsis "Functions to get fixed width of the character or string")
+ (description "This package provides functions to get fixed width of the
+character or string.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 21/26] gnu: Add go-github-com-rivo-uniseg.
(address . 47539@debbugs.gnu.org)
420c1ff64318c03a2eb1339e90ac4618413178bf.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-rivo-uniseg): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c86a78cc98..1e6e5e7aa5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7607,3 +7607,26 @@ projects.")
character or string.")
(license license:expat)))
+(define-public go-github-com-rivo-uniseg
+ (package
+ (name "go-github-com-rivo-uniseg")
+ (version "0.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rivo/uniseg.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0j7h22vfmjj562vr8gpsyrkrwp1pq9ayh5fylv24skxb467g9f0q"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/rivo/uniseg"))
+ (home-page "https://github.com/rivo/uniseg")
+ (synopsis "Unicode Text Segmentation for Go")
+ (description "This package implements Unicode Text Segmentation according
+to @url{https://unicode.org/reports/tr29/,Unicode Standard Annex #29}.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 23/26] gnu: Add go-gopkg-in-yaml-v3.
(address . 47539@debbugs.gnu.org)
2545eed1f21e95977822b79b8a6e3002990658a1.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-gopkg-in-yaml-v3): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1ee6728a4f..2186e023ea 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7662,3 +7662,29 @@ GraphQL API v4. It focuses on the following things:
@end itemize")
(license license:expat)))
+(define-public go-gopkg-in-yaml-v3
+ (package
+ (name "go-gopkg-in-yaml-v3")
+ (version "3.0.0-20210107192922-496545a6307b")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gopkg.in/yaml.v3")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g"))))
+ (build-system go-build-system)
+ (arguments '(#:import-path "gopkg.in/yaml.v3"))
+ (native-inputs
+ `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)))
+ (home-page "https://gopkg.in/yaml.v3")
+ (synopsis "YAML support for the Go language")
+ (description "This library enables Go programs to comfortably encode and
+decode YAML values. It is based on a pure Go port of the well-known libyaml C
+library to parse and generate YAML data quickly and reliably.")
+ (license (list license:expat
+ license:asl2.0))))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 24/26] gnu: Add go-github-com-shurcool-graphql.
(address . 47539@debbugs.gnu.org)
d18d11966ca89bce50cffaeab3ec77646f152a57.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-shurcool-graphql): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 2186e023ea..f220eca4ac 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7688,3 +7688,27 @@ library to parse and generate YAML data quickly and reliably.")
(license (list license:expat
license:asl2.0))))
+(define-public go-github-com-shurcool-graphql
+ (package
+ (name "go-github-com-shurcool-graphql")
+ (version "0.0.0-20200928012149-18c5c3165e3a")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/shurcooL/graphql.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0psxc2q3qsh1lfag11m2gz54fzzvlss5znyf34aars94igsjywzx"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/shurcooL/graphql"))
+ (native-inputs
+ `(("go-golang-org-x-net" ,go-golang-org-x-net)))
+ (home-page "https://github.com/shurcooL/graphql")
+ (synopsis "GraphQL client implementation")
+ (description "This package provides a GraphQL client implementation.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 22/26] gnu: Add go-github-com-shurcool-githubv4.
(address . 47539@debbugs.gnu.org)
33a74c1302b5cd68ed0324b4cfb383b915a0eeee.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-shurcool-githubv4): New variable.
---
gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1e6e5e7aa5..1ee6728a4f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7630,3 +7630,35 @@ character or string.")
to @url{https://unicode.org/reports/tr29/,Unicode Standard Annex #29}.")
(license license:expat)))
+(define-public go-github-com-shurcool-githubv4
+ (package
+ (name "go-github-com-shurcool-githubv4")
+ (version "0.0.0-20201206200315-234843c633fa")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/shurcooL/githubv4.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jmmjv95vcm9vl5zpvwv77pq3mhf2j2vxc7pj75yfniymp2dh5mi"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/shurcooL/githubv4"))
+ (native-inputs
+ `(("go-github-com-shurcooL-graphql" ,go-github-com-shurcool-graphql)
+ ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)))
+ (home-page "https://github.com/shurcooL/githubv4")
+ (synopsis "Client library for accessing the GitHub GraphQL API v4")
+ (description "This package is a client library for accessing the GitHub
+GraphQL API v4. It focuses on the following things:
+
+@itemize
+@item Friendly, simple and powerful API.
+@item Correctness, high performance and efficiency.
+@item Support for all of GitHub GraphQL API v4 via code generation from schema.
+@end itemize")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 00/26] Add github-cli and dependencies
(address . 47539@debbugs.gnu.org)
cover.1617301221.git.public@yoctocell.xyz
Changes since v1:

- Renamed 'gh' to 'github-cli' to avoid short two or three letter names.

- Added a phase in 'github-cli' to remove its dependence on the
'go-github-com-cli-safeexec' package, and I also removed
'go-github-com-cli-safeexec' itself since it is only used on Windows.

- Removed 'go-github-com-shurcool-sanitized-anchor-name' because it
already existed. Upstream uses '_' instead of '-' in the name, the Go
importer didn't convert '_' to '-' so I had to fix it myself without
realizing that the package already existed.
- Marked 'go-github-com-cli-shurcool-graphql' as a hidden package
because it is GitHub's own fork of 'go-github-com-shurcool-graphql',
and is only used by 'github-cli'.
Xinglu Chen (26):
gnu: Add go-github-com-hinshun-vt10x.
gnu: Add go-github-com-creack-pty.
gnu: Add go-github-com-kr-pty.
gnu: Add go-github-com-netflix-go-expect.
gnu: Add go-github-com-alecaivazis-survey-v2.
gnu: Add go-github-com-makenowjust-heredoc.
gnu: Add go-github-com-briandowns-spinner.
gnu: Add go-github-com-cli-browser.
gnu: Add go-github-com-cli-oauth.
gnu: Add go-github-com-cli-safeexec.
gnu: Add go-github-com-russross-blackfriday-v2.
gnu: Add go-github-com-cpuguy83-go-md2man-v2.
gnu: Add go-github-com-enescakir-emoji.
gnu: Add go-github-com-gabriel-vasile-mimetype.
gnu: Add go-github-com-google-shlex.
gnu: Add go-github-com-henvic-httpretty.
gnu: Add go-github-com-itchyny-go-flags.
gnu: Add go-github-com-itchyny-timefmt-go.
gnu: Add go-github-com-itchyny-gojq.
gnu: Add go-github-com-mattn-go-runewidth.
gnu: Add go-github-com-rivo-uniseg.
gnu: Add go-github-com-shurcool-githubv4.
gnu: Add go-gopkg-in-yaml-v3.
gnu: Add go-github-com-shurcool-graphql.
gnu: Add go-github-com-cli-shurcool-graphql.
gnu: Add github-cli.

gnu/packages/golang.scm | 697 +++++++++++++++++++++++++++++++
gnu/packages/version-control.scm | 145 +++++++
2 files changed, 842 insertions(+)


base-commit: 9c9a36de732ea8485e47e84b888e121233f68452
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 04/26] gnu: Add go-github-com-netflix-go-expect.
(address . 47539@debbugs.gnu.org)
56a4bc352acaf29d13b0607c450aa581f5203b1c.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-netflix-go-expect): New variable.
---
gnu/packages/golang.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 6664e28e8f..57ae6e3210 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7106,3 +7106,33 @@ larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(description "Pty is a Go package for using Unix pseudo-terminals.")
(license license:expat))))
+(define-public go-github-com-netflix-go-expect
+ (package
+ (name "go-github-com-netflix-go-expect")
+ (version "0.0.0-20201125194554-85d881c3777e")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Netflix/go-expect.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01s59hsdwy2nngngcgzyhncys56pdgzr6lff7k8kjrh26zk6pdv5"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/Netflix/go-expect"))
+ (native-inputs
+ `(("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-kr-pty" ,go-github-com-kr-pty)))
+ (home-page
+ "https://github.com/Netflix/go-expect")
+ (synopsis "Expect-like library to automate control of terminal programs")
+ (description "This package provides an expect-like interface to automate
+control of applications. It is unlike expect in that it does not spawn or
+manage process lifecycle. This package only focuses on expecting output and
+sending input through it's pseudoterminal.")
+ (license license:asl2.0)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 01/26] gnu: Add go-github-com-hinshun-vt10x.
(address . 47539@debbugs.gnu.org)
8dd6b0b0cd005621eb443798b9e0568b2e4cc924.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-hinshun-vt10x): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index d9988cd7ad..5e0526184f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -7034,3 +7035,27 @@ simplifications, and enforces style rules.")
"This package provides a library for fast, structured, leveled logging in
Go.")
(license license:expat)))
+
+(define-public go-github-com-hinshun-vt10x
+ (package
+ (name "go-github-com-hinshun-vt10x")
+ (version "0.0.0-20180809195222-d55458df857c")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hinshun/vt10x.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vwsp5iii7pf4na8pkd7cn3bawkwnsimkv1sysy7bslclg5jm370"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/hinshun/vt10x"))
+ (home-page "https://github.com/hinshun/vt10x")
+ (synopsis "vt10x terminal emulation backend")
+ (description "This package is a vt10x terminal emulation backend. It has
+larged been influenced by st, rxvt, xterm, and iTerm as reference.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 05/26] gnu: Add go-github-com-alecaivazis-survey-v2.
(address . 47539@debbugs.gnu.org)
1caaa23be675d3c7d9245b5d2d3d8258d99631d9.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-alecaivazis-survey-v2): New variable.
---
gnu/packages/golang.scm | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 57ae6e3210..268a88e15b 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -63,6 +63,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages textutils)
+ #:use-module ((gnu packages syncthing) #:select (go-github-com-kballard-go-shellquote))
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (ice-9 match)
@@ -7136,3 +7137,51 @@ manage process lifecycle. This package only focuses on expecting output and
sending input through it's pseudoterminal.")
(license license:asl2.0)))
+(define-public go-github-com-alecaivazis-survey-v2
+ (package
+ (name "go-github-com-alecaivazis-survey-v2")
+ (version "2.2.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AlecAivazis/survey.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jw4ka44q7a2885fil4qnb56mdlixmy5ysd68i5h5dblbq4r61l1"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/AlecAivazis/survey"))
+ (native-inputs
+ `(("go-golang-org-x-text" ,go-golang-org-x-text)
+ ("go-golang-org-x-sys" ,go-golang-org-x-sys)
+ ("go-golang-org-x-crypto"
+ ,go-golang-org-x-crypto)
+ ("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-pmezard-go-difflib"
+ ,go-github-com-pmezard-go-difflib)
+ ("go-github-com-mgutz-ansi"
+ ,go-github-com-mgutz-ansi)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-kr-pty" ,go-github-com-kr-pty)
+ ("go-github-com-kballard-go-shellquote"
+ ,go-github-com-kballard-go-shellquote)
+ ("go-github-com-hinshun-vt10x"
+ ,go-github-com-hinshun-vt10x)
+ ("go-github-com-davecgh-go-spew"
+ ,go-github-com-davecgh-go-spew)
+ ("go-github-com-netflix-go-expect"
+ ,go-github-com-netflix-go-expect)))
+ (home-page
+ "https://github.com/AlecAivazis/survey")
+ (synopsis "Build interactive prompts on terminals")
+ (description "This is a library for building interactive prompts on
+terminals supporting ANSI escape sequences.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 06/26] gnu: Add go-github-com-makenowjust-heredoc.
(address . 47539@debbugs.gnu.org)
c9b263d181755176a2b0d6ed4688a7c29a442c6d.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-makenowjust-heredoc): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 268a88e15b..b1e9baf85b 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7185,3 +7185,27 @@ sending input through it's pseudoterminal.")
terminals supporting ANSI escape sequences.")
(license license:expat)))
+(define-public go-github-com-makenowjust-heredoc
+ (package
+ (name "go-github-com-makenowjust-heredoc")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/MakeNowJust/heredoc.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18f21zm8n2wlnkz1ylw8rcxmqxyv2rlz8749yfqggm2m0m2884pj"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/MakeNowJust/heredoc"))
+ (home-page
+ "https://github.com/MakeNowJust/heredoc")
+ (synopsis "Here-documents with keeping indent")
+ (description "This package provides the Here-document with keeping
+indent.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 25/26] gnu: Add go-github-com-cli-shurcool-graphql.
(address . 47539@debbugs.gnu.org)
63f804a2f569ce800a1dade485c80bb395a4fd0a.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-shurcool-graphql): New variable.
---
gnu/packages/golang.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f220eca4ac..4ca2f280f9 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7712,3 +7712,22 @@ library to parse and generate YAML data quickly and reliably.")
(description "This package provides a GraphQL client implementation.")
(license license:expat)))
+;; GitHub's fork of go-github-com-shurcool-graphql, used by the 'github-cli'
+(define-public go-github-com-cli-shurcool-graphql
+ (hidden-package
+ (package
+ (inherit go-github-com-shurcool-graphql)
+ (name "go-github-com-cli-shurcool-graphql")
+ ;; Use the commit from the 'named-queries' branch
+ (version "0.0.0-20200707151639-0f7232a2bf7e")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/shurcooL-graphql.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19dv1zprs9zv5gnwql29r7lym08gh2jwkz0w0f62823b57m1rjp6"))))
+ (home-page "https://github.com/cli/shurcooL-graphql"))))
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 02/26] gnu: Add go-github-com-creack-pty.
(address . 47539@debbugs.gnu.org)
b43429035cf484f6544c70c6b7c3da1f3a8b0156.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-creack-pty): New variable.
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 5e0526184f..e6f834e7af 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7059,3 +7059,25 @@ Go.")
larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(license license:expat)))
+(define-public go-github-com-creack-pty
+ (package
+ (name "go-github-com-creack-pty")
+ (version "1.1.11")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/creack/pty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dwhch53vqxpnbiqvfa27cliabx9ma2m4dax4adlrz8rami4sakw"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/creack/pty"))
+ (home-page "https://github.com/creack/pty")
+ (synopsis "PTY interface for Go")
+ (description "Pty is a Go package for using Unix pseudo-terminals.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 07/26] gnu: Add go-github-com-briandowns-spinner.
(address . 47539@debbugs.gnu.org)
a06df88fec1609f7892db4d581f12d79ced9d936.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-briandowns-spinner): New variable.
---
gnu/packages/golang.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b1e9baf85b..11312227ff 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7209,3 +7209,32 @@ terminals supporting ANSI escape sequences.")
indent.")
(license license:expat)))
+(define-public go-github-com-briandowns-spinner
+ (package
+ (name "go-github-com-briandowns-spinner")
+ (version "1.12.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/briandowns/spinner.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1n6h2iqq5anqg9p2pwz684vhfjx0944rrw53x2cn5m1dybp6rbwx"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/briandowns/spinner"))
+ (native-inputs
+ `(("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-fatih-color"
+ ,go-github-com-fatih-color)))
+ (home-page
+ "https://github.com/briandowns/spinner")
+ (synopsis "Progress indicator for any terminal application")
+ (description "This is a simple package to add a spinner or progress
+indicator to any terminal application. ")
+ (license license:asl2.0)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 08/26] gnu: Add go-github-com-cli-browser.
(address . 47539@debbugs.gnu.org)
8e0939a2014c562ca03ebb5745b1e54ded26d877.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-browser): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 11312227ff..1cdc04bde6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7238,3 +7238,28 @@ indent.")
indicator to any terminal application. ")
(license license:asl2.0)))
+(define-public go-github-com-cli-browser
+ (package
+ (name "go-github-com-cli-browser")
+ (version "1.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/browser.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "13z27cc0a184bhprspwclzbvrzsrfd5qyk5r2djfx5nm85igxr0n"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cli/browser"))
+ (native-inputs
+ `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
+ (home-page "https://github.com/cli/browser")
+ (synopsis "Helpers to open URLs, or files in the default web browser")
+ (description "This library provides helpers to open URLs, readers, or
+files in the system default web browser.")
+ (license license:bsd-2)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 03/26] gnu: Add go-github-com-kr-pty.
(address . 47539@debbugs.gnu.org)
3b53ec64774b2ca15c72c5c29be582b050728b2a.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-kr-pty): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e6f834e7af..6664e28e8f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7081,3 +7081,28 @@ larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(description "Pty is a Go package for using Unix pseudo-terminals.")
(license license:expat)))
+;; Deprecated in favor of 'go-github-com-creack-pty', but needed by github-cli
+(define-public go-github-com-kr-pty
+ (hidden-package
+ (package
+ (name "go-github-com-kr-pty")
+ (version "1.1.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kr/pty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "go-github-com-kr-pty" version))
+ (sha256
+ (base32
+ "1vcl6f90n0f8s8b4fyh0832ilybjqcypqyj233lqj1hx62fvgdbk"))))
+ (build-system go-build-system)
+ (arguments '(#:import-path "github.com/kr/pty"))
+ (propagated-inputs
+ `(("go-github-com-creack-pty" ,go-github-com-creack-pty)))
+ (home-page "https://github.com/kr/pty")
+ (synopsis "PTY interface for Go")
+ (description "Pty is a Go package for using Unix pseudo-terminals.")
+ (license license:expat))))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 09/26] gnu: Add go-github-com-cli-oauth.
(address . 47539@debbugs.gnu.org)
80db6e4d1aa13dc88c01333df023b61b5f9e3aa5.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-oauth): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1cdc04bde6..8d0a44c06c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7263,3 +7263,29 @@ indicator to any terminal application. ")
files in the system default web browser.")
(license license:bsd-2)))
+(define-public go-github-com-cli-oauth
+ (package
+ (name "go-github-com-cli-oauth")
+ (version "0.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/oauth.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1b96cl53qc40xsgpxpy9qkrib4a4g02a4sq442qp8749qab5ljhs"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cli/oauth"))
+ (native-inputs
+ `(("go-github-com-cli-browser"
+ ,go-github-com-cli-browser)))
+ (home-page "https://github.com/cli/oauth")
+ (synopsis "Perform OAuth Device flow and Web application flow in Go")
+ (description "This is a library for performing OAuth Device flow and Web
+application flow in Go client apps.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 10/26] gnu: Add go-github-com-cli-safeexec.
(address . 47539@debbugs.gnu.org)
124fab475e761fdfd6192cb81dc079740161c200.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-safeexec): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8d0a44c06c..1d5c99e08a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7289,3 +7289,28 @@ files in the system default web browser.")
application flow in Go client apps.")
(license license:expat)))
+;; Needed by the 'github-cli'
+(define-public go-github-com-cli-safeexec
+ (hidden-package
+ (package
+ (name "go-github-com-cli-safeexec")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/safeexec.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1q80va3721dyw33lrnv7x3gd66kcnbsm38dv3lk7xqhii2adawmk"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cli/safeexec"))
+ (home-page "https://github.com/cli/safeexec")
+ (synopsis "Safer alternative to exec.LookPath() on Windows")
+ (description "This library provides a safer alternative to
+@code{exec.LookPath()} on Windows.")
+ (license license:bsd-2))))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 11/26] gnu: Add go-github-com-russross-blackfriday-v2.
(address . 47539@debbugs.gnu.org)
5a80b64521f2f695d55fa2ae6a772a0e9de5d7e7.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-russross-blackfriday-v2): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1d5c99e08a..cbfc5c7706 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7314,3 +7314,29 @@ application flow in Go client apps.")
@code{exec.LookPath()} on Windows.")
(license license:bsd-2))))
+(define-public go-github-com-russross-blackfriday-v2
+ (package
+ (name "go-github-com-russross-blackfriday-v2")
+ (version "2.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/russross/blackfriday.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0d1rg1drrfmabilqjjayklsz5d0n3hkf979sr3wsrw92bfbkivs7"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/russross/blackfriday"))
+ (home-page
+ "https://github.com/russross/blackfriday")
+ (synopsis "Markdown processor implemented in Go")
+ (description "Blackfriday is a Markdown processor implemented in Go. It
+is paranoid about its input (so you can safely feed it user-supplied data), it
+is fast, it supports common extensions (tables, smart punctuation
+substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
+ (license license:bsd-2)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 12/26] gnu: Add go-github-com-cpuguy83-go-md2man-v2.
(address . 47539@debbugs.gnu.org)
6fe2415d975d435906e9ce5066407d86422d1afd.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cpuguy83-go-md2man-v2): New variable.
---
gnu/packages/golang.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cbfc5c7706..13ce1a4e4e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7340,3 +7340,32 @@ is fast, it supports common extensions (tables, smart punctuation
substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
(license license:bsd-2)))
+(define-public go-github-com-cpuguy83-go-md2man-v2
+ (package
+ (name "go-github-com-cpuguy83-go-md2man-v2")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cpuguy83/go-md2man.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0r1f7v475dxxgzqci1mxfliwadcrk86ippflx9n411325l4g3ghv"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cpuguy83/go-md2man"))
+ (native-inputs
+ `(("go-github-com-shurcool-sanitized-anchor-name"
+ ,go-github-com-shurcool-sanitized-anchor-name)
+ ("go-github-com-russross-blackfriday-v2"
+ ,go-github-com-russross-blackfriday-v2)
+ ("go-github-com-pmezard-go-difflib"
+ ,go-github-com-pmezard-go-difflib)))
+ (home-page
+ "https://github.com/cpuguy83/go-md2man")
+ (synopsis "Convert Markdown into Man pages")
+ (description "This package converts Markdown into Roff Man pages.")
+ (license license:expat)))
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 13/26] gnu: Add go-github-com-enescakir-emoji.
(address . 47539@debbugs.gnu.org)
36b5eabd4d3e23dbb4581015ec8b9cd35fa49de2.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-enescakir-emoji): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 13ce1a4e4e..231f1babc6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7369,3 +7369,27 @@ substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
(synopsis "Convert Markdown into Man pages")
(description "This package converts Markdown into Roff Man pages.")
(license license:expat)))
+
+(define-public go-github-com-enescakir-emoji
+ (package
+ (name "go-github-com-enescakir-emoji")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/enescakir/emoji.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1xnisfsn94izcjhl4xywd971av4b5v1n67figp16wh443lhihxky"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/enescakir/emoji"))
+ (home-page "https://github.com/enescakir/emoji")
+ (synopsis "Minimalistic emoji package for Go")
+ (description "This package provides a minimalistic emoji library for
+Go. It lets you use emoji characters in strings.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 14/26] gnu: Add go-github-com-gabriel-vasile-mimetype.
(address . 47539@debbugs.gnu.org)
4590a87c1ec7d8ce4e64befbdc54a1f52925193e.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-gabriel-vasile-mimetype): New variable.
---
gnu/packages/golang.scm | 47 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 231f1babc6..5d05c383c6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7393,3 +7393,50 @@ substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
Go. It lets you use emoji characters in strings.")
(license license:expat)))
+(define-public go-github-com-gabriel-vasile-mimetype
+ (package
+ (name "go-github-com-gabriel-vasile-mimetype")
+ (version "1.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gabriel-vasile/mimetype.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ysb0pjhyr9b7q2y39b5hpwsaidgfl42gd07yj34mgmb9wfjb7ch"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/gabriel-vasile/mimetype"
+ ;; FIXME: Cannot open 'supported_mimes.md'
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; The files are read-only
+ (add-before 'reset-gzip-timestamps 'make-gz-files-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each make-file-writable
+ (find-files (string-append (assoc-ref outputs "out"))
+ ".*\\.gz$"))
+ #t)))))
+
+ (home-page
+ "https://github.com/gabriel-vasile/mimetype")
+ (synopsis "A fast golang library for MIME type and file extension detection")
+ (description "This is a package for detecting MIME types and extensions
+based on magic numbers. Features include
+
+@itemize
+@item fast and precise MIME type and file extension detection
+@item long list of supported MIME types
+@item common file formats are prioritized
+@item small and simple API
+@item handles MIME type aliases
+@item thread safe
+@item low memory usage, besides the file header
+@end itemize")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 15/26] gnu: Add go-github-com-google-shlex.
(address . 47539@debbugs.gnu.org)
c66deb9b0fe91a3917527e1afe5cb9c9de2b12c5.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-google-shlex): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 5d05c383c6..e8712b22d5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7440,3 +7440,26 @@ based on magic numbers. Features include
@end itemize")
(license license:expat)))
+(define-public go-github-com-google-shlex
+ (package
+ (name "go-github-com-google-shlex")
+ (version "0.0.0-20191202100458-e7afc7fbc510")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/shlex.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "14z8hqyik910wk2qwnzgz8mjsmiamxa0pj55ahbv0jx6j3dgvzfm"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/google/shlex"))
+ (home-page "https://github.com/google/shlex")
+ (synopsis "Simple lexer for Go")
+ (description "This library provides is a simple lexer for Go that supports
+shell-style quoting, commenting, and escaping.")
+ (license license:asl2.0)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 17/26] gnu: Add go-github-com-itchyny-go-flags.
(address . 47539@debbugs.gnu.org)
6f95c8dd6a62423192fa8e25cf25831b4a2b773a.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-go-flags): New variable.
---
gnu/packages/golang.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 0234522408..6707b15273 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7486,3 +7486,36 @@ shell-style quoting, commenting, and escaping.")
pretty on your terminal.")
(license license:expat)))
+(define-public go-github-com-itchyny-go-flags
+ (package
+ (name "go-github-com-itchyny-go-flags")
+ (version "1.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/go-flags.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0qfh7gn95aldlsigk72jl87npmwvx15kb7df1100d6j0nbakd8b5"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/itchyny/go-flags"
+ ;; Unable to find man page
+ #:tests? #f))
+ (native-inputs
+ `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
+ (home-page "https://github.com/itchyny/go-flags")
+ (synopsis "Go library for parsing command line arguments")
+ (description "This library provides similar functionality to the builtin
+flag library of Go, but provides much more functionality.
+
+Package flags provides an extensive command line option parser. The flags
+package is similar in functionality to the go builtin flag package but
+provides more options and uses reflection to provide a convenient and succinct
+way of specifying command line options.")
+ (license license:bsd-3)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 26/26] gnu: Add github-cli.
(address . 47539@debbugs.gnu.org)
e760d13298c7334879103c4724e65cbb8357642a.1617301221.git.public@yoctocell.xyz
* gnu/packages/version-control.scm (github-cli): New variable.
---
gnu/packages/version-control.scm | 145 +++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+)

Toggle diff (165 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index e7fa6e6777..6e66897806 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -118,6 +118,7 @@
#:use-module (gnu packages sdl)
#:use-module (gnu packages swig)
#:use-module (gnu packages sync)
+ #:use-module ((gnu packages syncthing) #:select (go-github-com-kballard-go-shellquote))
#:use-module (gnu packages tcl)
#:use-module (gnu packages textutils)
#:use-module (gnu packages time)
@@ -3021,6 +3022,150 @@ commit message side by side
If several repos are related, it helps to see their status together.")
(license license:expat))))
+(define-public github-cli
+ (package
+ (name "github-cli")
+ (version "1.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/cli.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "009jh1i1ji7d773ismifdw4qvwlb8s1zn14d0n84j9h3n0hyynbc"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/cli/cli/cmd/gh"
+ #:unpack-path
+ "github.com/cli/cli"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-safeexec
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion "src/github.com/cli/cli/"
+ ;; 'github.com/cli/safeexec' is only used for Windows, we
+ ;; replace it with the regular 'os/exec'. See
+ ;; <https://issues.guix.gnu.org/47539> for discussion.
+ (substitute* '("pkg/cmd/alias/expand/expand.go"
+ "script/build.go")
+ (("github.com/cli/safeexec") "os/exec")
+ (("safeexec") "exec"))
+ ;; These files have already imported 'os/exec', meaning that
+ ;; 'os/exec' would get imported twice, causing an error.
+ ;; Instead, we just remove the 'github.com/cli/safeexec'.
+ (substitute* '("cmd/gh/main.go"
+ "git/git.go"
+ "pkg/iostreams/iostreams.go"
+ "pkg/cmd/auth/shared/ssh_keys.go"
+ "pkg/cmd/pr/checkout/checkout.go"
+ "pkg/cmdutil/web_browser.go"
+ "pkg/surveyext/editor_manual.go")
+ (("\"github.com/cli/safeexec\"") "")
+ (("safeexec") "exec"))))))))
+ (native-inputs
+ `(("go-github-com-cli-shurcool-graphql"
+ ,go-github-com-cli-shurcool-graphql)
+ ("go-gopkg-in-yaml-v3" ,go-gopkg-in-yaml-v3)
+ ("go-golang-org-x-text" ,go-golang-org-x-text)
+ ("go-golang-org-x-sync" ,go-golang-org-x-sync)
+ ("go-golang-org-x-crypto"
+ ,go-golang-org-x-crypto)
+ ("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-spf13-pflag"
+ ,go-github-com-spf13-pflag)
+ ("go-github-com-spf13-cobra"
+ ,go-github-com-spf13-cobra)
+ ("go-github-com-shurcool-githubv4"
+ ,go-github-com-shurcool-githubv4)
+ ("go-github-com-rivo-uniseg"
+ ,go-github-com-rivo-uniseg)
+ ("go-github-com-muesli-termenv"
+ ,go-github-com-muesli-termenv)
+ ("go-github-com-mitchellh-go-homedir"
+ ,go-github-com-mitchellh-go-homedir)
+ ("go-github-com-mgutz-ansi"
+ ,go-github-com-mgutz-ansi)
+ ("go-github-com-mattn-go-runewidth"
+ ,go-github-com-mattn-go-runewidth)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-kballard-go-shellquote"
+ ,go-github-com-kballard-go-shellquote)
+ ("go-github-com-itchyny-gojq"
+ ,go-github-com-itchyny-gojq)
+ ("go-github-com-henvic-httpretty"
+ ,go-github-com-henvic-httpretty)
+ ("go-github-com-hashicorp-go-version"
+ ,go-github-com-hashicorp-go-version)
+ ("go-github-com-google-shlex"
+ ,go-github-com-google-shlex)
+ ("go-github-com-google-go-cmp-cmp"
+ ,go-github-com-google-go-cmp-cmp)
+ ("go-github-com-gabriel-vasile-mimetype"
+ ,go-github-com-gabriel-vasile-mimetype)
+ ("go-github-com-enescakir-emoji"
+ ,go-github-com-enescakir-emoji)
+ ("go-github-com-cpuguy83-go-md2man-v2"
+ ,go-github-com-cpuguy83-go-md2man-v2)
+ ("go-github-com-cli-oauth"
+ ,go-github-com-cli-oauth)
+ ("go-github-com-cli-browser"
+ ,go-github-com-cli-browser)
+ ("go-github-com-briandowns-spinner"
+ ,go-github-com-briandowns-spinner)
+ ("go-github-com-makenowjust-heredoc"
+ ,go-github-com-makenowjust-heredoc)
+ ("go-github-com-alecaivazis-survey-v2"
+ ,go-github-com-alecaivazis-survey-v2)
+ ("go-github-com-charmbracelet-glamour"
+ ,go-github-com-charmbracelet-glamour)
+ ("go-github-com-alecthomas-chroma"
+ ,go-github-com-alecthomas-chroma)
+ ("go-github-com-google-goterm"
+ ,go-github-com-google-goterm)
+ ("go-github-com-aymerick-douceur"
+ ,go-github-com-aymerick-douceur)
+ ("go-github-com-danwakefield-fnmatch"
+ ,go-github-com-danwakefield-fnmatch)
+ ("go-github-com-chris-ramon-douceur"
+ ,go-github-com-chris-ramon-douceur)
+ ("go-github-com-gorilla-css"
+ ,go-github-com-gorilla-css)
+ ("go-golang-org-colorful"
+ ,go-golang-org-colorful)
+ ("go-golang-org-x-net"
+ ,go-golang-org-x-net)
+ ("go-github-com-muesli-reflow-ansi"
+ ,go-github-com-muesli-reflow-ansi)
+ ("go-github-com-microcosm-cc-bluemonday"
+ ,go-github-com-microcosm-cc-bluemonday)
+ ("go-github-com-muesli-reflow-wordwrap"
+ ,go-github-com-muesli-reflow-wordwrap)
+ ("go-github-com-yuin-goldmark"
+ ,go-github-com-yuin-goldmark)
+ ("go-github-com-dlclark-regexp2"
+ ,go-github-com-dlclark-regexp2)
+ ("go-github-com-muesli-reflow-indent"
+ ,go-github-com-muesli-reflow-indent)
+ ("go-github-com-muesli-reflow-padding"
+ ,go-github-com-muesli-reflow-padding)
+ ("go-github-com-olekukonko-tablewriter"
+ ,go-github-com-olekukonko-tablewriter)))
+ (home-page "https://github.com/cli/cli")
+ (synopsis "CLI interface to GitHub")
+ (description "This package provides the @command{gh} command, an interface
+to GitHub on the command line. It brings pull requests, issues, and other
+GitHub concepts to the terminal next to where you are already working with Git
+and your code.")
+ (license license:expat)))
+
(define-public ghq
(package
(name "ghq")
--
2.31.1
X
X
Xinglu Chen wrote on 1 Apr 2021 20:31
[PATCH v2 16/26] gnu: Add go-github-com-henvic-httpretty.
(address . 47539@debbugs.gnu.org)
d1d7a1c746fe84d0064e75af1749833b0c8f498a.1617301221.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-henvic-httpretty): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e8712b22d5..0234522408 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7463,3 +7463,26 @@ based on magic numbers. Features include
shell-style quoting, commenting, and escaping.")
(license license:asl2.0)))
+(define-public go-github-com-henvic-httpretty
+ (package
+ (name "go-github-com-henvic-httpretty")
+ (version "0.0.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/henvic/httpretty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jbnj1x8wribayx65ssxigs9p88pi0cxg36h8qhqvqz1pqiygksa"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/henvic/httpretty"))
+ (home-page "https://github.com/henvic/httpretty")
+ (synopsis "Print the HTTP requests you make on your terminal")
+ (description "This packages prints the HTTP requests you make with Go
+pretty on your terminal.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 15:24
Re: [bug#47539] [PATCH v2 00/26] Add github-cli and dependencies
(address . 47539@debbugs.gnu.org)(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
87im4ie7bg.fsf@yoctocell.xyz
Friendly ping! :)
L
L
Leo Prikler wrote on 19 Apr 2021 16:15
dd0d1bfa4c47574edbd32da3a0c8474388b79d60.camel@student.tugraz.at
Am Montag, den 19.04.2021, 15:24 +0200 schrieb Xinglu Chen:
Toggle quote (1 lines)
> Friendly ping! :)
I think you fixed most of my concerns from the previous run, but
looking at Patchwork, there appear to still be a few issues:

1. Some patches don't seem to apply correctly over at Patchwork [1].
This can perhaps be ignored, as it seems to be an issue with patches
being received out of order and the last one applies cleanly.
2. The corresponding revision fails to build [2].
3. The patch for safeexec still seems to be part of the series even
though it's unused. Didn't you mean to exclude that one?

Again, I'm not really familiar with the Go side of things, so while as
a reviewer I can point out stuff, that is not aesthetically pleasing,
as a committer I'm somewhat forced to trust what the CI tells me. I
would personally feel more reassured if someone with a bit of Go
experience had a look at this patch set, but judging from the 2 weeks
of silence, it seems they are all sleeping or silently trusting me to
do a good job.

Regards,
Leo

[1]
X
X
Xinglu Chen wrote on 19 Apr 2021 16:39
878s5ee3t6.fsf@yoctocell.xyz
On Mon, Apr 19 2021, Leo Prikler wrote:

Toggle quote (9 lines)
> Am Montag, den 19.04.2021, 15:24 +0200 schrieb Xinglu Chen:
>> Friendly ping! :)
> I think you fixed most of my concerns from the previous run, but
> looking at Patchwork, there appear to still be a few issues:
>
> 1. Some patches don't seem to apply correctly over at Patchwork [1].
> This can perhaps be ignored, as it seems to be an issue with patches
> being received out of order and the last one applies cleanly.

Hmm, they applied on my local checkout, maybe it’s something to do with
the order.

Toggle quote (2 lines)
> 2. The corresponding revision fails to build [2].

I will look into that.

Toggle quote (3 lines)
> 3. The patch for safeexec still seems to be part of the series even
> though it's unused. Didn't you mean to exclude that one?

Oops, not sure what I did there, it should be removed.

Toggle quote (8 lines)
> Again, I'm not really familiar with the Go side of things, so while as
> a reviewer I can point out stuff, that is not aesthetically pleasing,
> as a committer I'm somewhat forced to trust what the CI tells me. I
> would personally feel more reassured if someone with a bit of Go
> experience had a look at this patch set, but judging from the 2 weeks
> of silence, it seems they are all sleeping or silently trusting me to
> do a good job.

Understood, thanks for taking a look!
X
X
Xinglu Chen wrote on 19 Apr 2021 17:21
[PATCH v3 00/25] Add github-cli and dependencies
(address . 47539@debbugs.gnu.org)
cover.1618845645.git.public@yoctocell.xyz
Changes since v2:

- Actually remove go-github-com-cli-safeexec

Xinglu Chen (25):
gnu: Add go-github-com-hinshun-vt10x.
gnu: Add go-github-com-creack-pty.
gnu: Add go-github-com-kr-pty.
gnu: Add go-github-com-netflix-go-expect.
gnu: Add go-github-com-alecaivazis-survey-v2.
gnu: Add go-github-com-makenowjust-heredoc.
gnu: Add go-github-com-briandowns-spinner.
gnu: Add go-github-com-cli-browser.
gnu: Add go-github-com-cli-oauth.
gnu: Add go-github-com-russross-blackfriday-v2.
gnu: Add go-github-com-cpuguy83-go-md2man-v2.
gnu: Add go-github-com-enescakir-emoji.
gnu: Add go-github-com-gabriel-vasile-mimetype.
gnu: Add go-github-com-google-shlex.
gnu: Add go-github-com-henvic-httpretty.
gnu: Add go-github-com-itchyny-go-flags.
gnu: Add go-github-com-itchyny-timefmt-go.
gnu: Add go-github-com-itchyny-gojq.
gnu: Add go-github-com-mattn-go-runewidth.
gnu: Add go-github-com-rivo-uniseg.
gnu: Add go-github-com-shurcool-githubv4.
gnu: Add go-gopkg-in-yaml-v3.
gnu: Add go-github-com-shurcool-graphql.
gnu: Add go-github-com-cli-shurcool-graphql.
gnu: Add github-cli.

gnu/packages/golang.scm | 672 +++++++++++++++++++++++++++++++
gnu/packages/version-control.scm | 145 +++++++
2 files changed, 817 insertions(+)


base-commit: 1eb26d0e07ad439c935b324c1ed858f50e9dcccd
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 01/25] gnu: Add go-github-com-hinshun-vt10x.
(address . 47539@debbugs.gnu.org)
b533c9be40ccbc36e6c5040c73566e3b8510e0c2.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-hinshun-vt10x): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 6502740220..b08f0ababc 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -7033,3 +7034,27 @@ simplifications, and enforces style rules.")
"This package provides a library for fast, structured, leveled logging in
Go.")
(license license:expat)))
+
+(define-public go-github-com-hinshun-vt10x
+ (package
+ (name "go-github-com-hinshun-vt10x")
+ (version "0.0.0-20180809195222-d55458df857c")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hinshun/vt10x.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vwsp5iii7pf4na8pkd7cn3bawkwnsimkv1sysy7bslclg5jm370"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/hinshun/vt10x"))
+ (home-page "https://github.com/hinshun/vt10x")
+ (synopsis "vt10x terminal emulation backend")
+ (description "This package is a vt10x terminal emulation backend. It has
+larged been influenced by st, rxvt, xterm, and iTerm as reference.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 02/25] gnu: Add go-github-com-creack-pty.
(address . 47539@debbugs.gnu.org)
fa9714bccfd3d66bbdc8a9ba0ccb71ff20183ae1.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-creack-pty): New variable.
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b08f0ababc..f1a6783215 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7058,3 +7058,25 @@ Go.")
larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(license license:expat)))
+(define-public go-github-com-creack-pty
+ (package
+ (name "go-github-com-creack-pty")
+ (version "1.1.11")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/creack/pty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dwhch53vqxpnbiqvfa27cliabx9ma2m4dax4adlrz8rami4sakw"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/creack/pty"))
+ (home-page "https://github.com/creack/pty")
+ (synopsis "PTY interface for Go")
+ (description "Pty is a Go package for using Unix pseudo-terminals.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 03/25] gnu: Add go-github-com-kr-pty.
(address . 47539@debbugs.gnu.org)
d9aebbd16083dc54bcc19e95aa5f14784f35456e.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-kr-pty): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f1a6783215..0ff2d61740 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7080,3 +7080,28 @@ larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(description "Pty is a Go package for using Unix pseudo-terminals.")
(license license:expat)))
+;; Deprecated in favor of 'go-github-com-creack-pty', but needed by github-cli
+(define-public go-github-com-kr-pty
+ (hidden-package
+ (package
+ (name "go-github-com-kr-pty")
+ (version "1.1.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kr/pty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "go-github-com-kr-pty" version))
+ (sha256
+ (base32
+ "1vcl6f90n0f8s8b4fyh0832ilybjqcypqyj233lqj1hx62fvgdbk"))))
+ (build-system go-build-system)
+ (arguments '(#:import-path "github.com/kr/pty"))
+ (propagated-inputs
+ `(("go-github-com-creack-pty" ,go-github-com-creack-pty)))
+ (home-page "https://github.com/kr/pty")
+ (synopsis "PTY interface for Go")
+ (description "Pty is a Go package for using Unix pseudo-terminals.")
+ (license license:expat))))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 05/25] gnu: Add go-github-com-alecaivazis-survey-v2.
(address . 47539@debbugs.gnu.org)
67b318b21627af1c72050a24aa2f5ae518600711.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-alecaivazis-survey-v2): New variable.
---
gnu/packages/golang.scm | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 91f853c105..64740316cb 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -63,6 +63,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages textutils)
+ #:use-module ((gnu packages syncthing) #:select (go-github-com-kballard-go-shellquote))
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (ice-9 match)
@@ -7135,3 +7136,51 @@ manage process lifecycle. This package only focuses on expecting output and
sending input through it's pseudoterminal.")
(license license:asl2.0)))
+(define-public go-github-com-alecaivazis-survey-v2
+ (package
+ (name "go-github-com-alecaivazis-survey-v2")
+ (version "2.2.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AlecAivazis/survey.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jw4ka44q7a2885fil4qnb56mdlixmy5ysd68i5h5dblbq4r61l1"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/AlecAivazis/survey"))
+ (native-inputs
+ `(("go-golang-org-x-text" ,go-golang-org-x-text)
+ ("go-golang-org-x-sys" ,go-golang-org-x-sys)
+ ("go-golang-org-x-crypto"
+ ,go-golang-org-x-crypto)
+ ("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-pmezard-go-difflib"
+ ,go-github-com-pmezard-go-difflib)
+ ("go-github-com-mgutz-ansi"
+ ,go-github-com-mgutz-ansi)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-kr-pty" ,go-github-com-kr-pty)
+ ("go-github-com-kballard-go-shellquote"
+ ,go-github-com-kballard-go-shellquote)
+ ("go-github-com-hinshun-vt10x"
+ ,go-github-com-hinshun-vt10x)
+ ("go-github-com-davecgh-go-spew"
+ ,go-github-com-davecgh-go-spew)
+ ("go-github-com-netflix-go-expect"
+ ,go-github-com-netflix-go-expect)))
+ (home-page
+ "https://github.com/AlecAivazis/survey")
+ (synopsis "Build interactive prompts on terminals")
+ (description "This is a library for building interactive prompts on
+terminals supporting ANSI escape sequences.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 04/25] gnu: Add go-github-com-netflix-go-expect.
(address . 47539@debbugs.gnu.org)
23431b1aa96a955f07cf5285842345c1106d39fc.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-netflix-go-expect): New variable.
---
gnu/packages/golang.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 0ff2d61740..91f853c105 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7105,3 +7105,33 @@ larged been influenced by st, rxvt, xterm, and iTerm as reference.")
(description "Pty is a Go package for using Unix pseudo-terminals.")
(license license:expat))))
+(define-public go-github-com-netflix-go-expect
+ (package
+ (name "go-github-com-netflix-go-expect")
+ (version "0.0.0-20201125194554-85d881c3777e")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Netflix/go-expect.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01s59hsdwy2nngngcgzyhncys56pdgzr6lff7k8kjrh26zk6pdv5"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/Netflix/go-expect"))
+ (native-inputs
+ `(("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-kr-pty" ,go-github-com-kr-pty)))
+ (home-page
+ "https://github.com/Netflix/go-expect")
+ (synopsis "Expect-like library to automate control of terminal programs")
+ (description "This package provides an expect-like interface to automate
+control of applications. It is unlike expect in that it does not spawn or
+manage process lifecycle. This package only focuses on expecting output and
+sending input through it's pseudoterminal.")
+ (license license:asl2.0)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 06/25] gnu: Add go-github-com-makenowjust-heredoc.
(address . 47539@debbugs.gnu.org)
64dc3baaf56d736091c72e060005e910fb2e3c22.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-makenowjust-heredoc): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 64740316cb..650844fcbf 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7184,3 +7184,27 @@ sending input through it's pseudoterminal.")
terminals supporting ANSI escape sequences.")
(license license:expat)))
+(define-public go-github-com-makenowjust-heredoc
+ (package
+ (name "go-github-com-makenowjust-heredoc")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/MakeNowJust/heredoc.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18f21zm8n2wlnkz1ylw8rcxmqxyv2rlz8749yfqggm2m0m2884pj"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/MakeNowJust/heredoc"))
+ (home-page
+ "https://github.com/MakeNowJust/heredoc")
+ (synopsis "Here-documents with keeping indent")
+ (description "This package provides the Here-document with keeping
+indent.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 07/25] gnu: Add go-github-com-briandowns-spinner.
(address . 47539@debbugs.gnu.org)
e591fc3e769f9ce9132de9f5f232fb2e16978b7f.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-briandowns-spinner): New variable.
---
gnu/packages/golang.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 650844fcbf..968166df75 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7208,3 +7208,32 @@ terminals supporting ANSI escape sequences.")
indent.")
(license license:expat)))
+(define-public go-github-com-briandowns-spinner
+ (package
+ (name "go-github-com-briandowns-spinner")
+ (version "1.12.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/briandowns/spinner.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1n6h2iqq5anqg9p2pwz684vhfjx0944rrw53x2cn5m1dybp6rbwx"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/briandowns/spinner"))
+ (native-inputs
+ `(("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-fatih-color"
+ ,go-github-com-fatih-color)))
+ (home-page
+ "https://github.com/briandowns/spinner")
+ (synopsis "Progress indicator for any terminal application")
+ (description "This is a simple package to add a spinner or progress
+indicator to any terminal application. ")
+ (license license:asl2.0)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 08/25] gnu: Add go-github-com-cli-browser.
(address . 47539@debbugs.gnu.org)
d0154d2a71e8df30c7bed1f6c4707d8656aadebe.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-browser): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 968166df75..17ea7dc210 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7237,3 +7237,28 @@ indent.")
indicator to any terminal application. ")
(license license:asl2.0)))
+(define-public go-github-com-cli-browser
+ (package
+ (name "go-github-com-cli-browser")
+ (version "1.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/browser.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "13z27cc0a184bhprspwclzbvrzsrfd5qyk5r2djfx5nm85igxr0n"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cli/browser"))
+ (native-inputs
+ `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
+ (home-page "https://github.com/cli/browser")
+ (synopsis "Helpers to open URLs, or files in the default web browser")
+ (description "This library provides helpers to open URLs, readers, or
+files in the system default web browser.")
+ (license license:bsd-2)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 09/25] gnu: Add go-github-com-cli-oauth.
(address . 47539@debbugs.gnu.org)
c92d51ce333075f87b3fca409ca94cf0fee947b0.1618845645.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-oauth): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 17ea7dc210..f250571c38 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7262,3 +7262,29 @@ indicator to any terminal application. ")
files in the system default web browser.")
(license license:bsd-2)))
+(define-public go-github-com-cli-oauth
+ (package
+ (name "go-github-com-cli-oauth")
+ (version "0.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/oauth.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1b96cl53qc40xsgpxpy9qkrib4a4g02a4sq442qp8749qab5ljhs"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cli/oauth"))
+ (native-inputs
+ `(("go-github-com-cli-browser"
+ ,go-github-com-cli-browser)))
+ (home-page "https://github.com/cli/oauth")
+ (synopsis "Perform OAuth Device flow and Web application flow in Go")
+ (description "This is a library for performing OAuth Device flow and Web
+application flow in Go client apps.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 10/25] gnu: Add go-github-com-russross-blackfriday-v2.
(address . 47539@debbugs.gnu.org)
66bb8a8b5346cf6078f5f23db9c455739c3afa50.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-russross-blackfriday-v2): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f250571c38..88b944b25a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7288,3 +7288,28 @@ files in the system default web browser.")
application flow in Go client apps.")
(license license:expat)))
+(define-public go-github-com-russross-blackfriday-v2
+ (package
+ (name "go-github-com-russross-blackfriday-v2")
+ (version "2.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/russross/blackfriday.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0d1rg1drrfmabilqjjayklsz5d0n3hkf979sr3wsrw92bfbkivs7"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/russross/blackfriday"))
+ (home-page
+ "https://github.com/russross/blackfriday")
+ (synopsis "Markdown processor implemented in Go")
+ (description "Blackfriday is a Markdown processor implemented in Go. It
+is paranoid about its input (so you can safely feed it user-supplied data), it
+is fast, it supports common extensions (tables, smart punctuation
+substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
+ (license license:bsd-2)))
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:22
[PATCH v3 11/25] gnu: Add go-github-com-cpuguy83-go-md2man-v2.
(address . 47539@debbugs.gnu.org)
79b9a3c4de289f1a05a96d50c0e76b75a61f9c9c.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cpuguy83-go-md2man-v2): New variable.
---
gnu/packages/golang.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 88b944b25a..ee4a94c613 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7313,3 +7313,33 @@ is paranoid about its input (so you can safely feed it user-supplied data), it
is fast, it supports common extensions (tables, smart punctuation
substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
(license license:bsd-2)))
+
+(define-public go-github-com-cpuguy83-go-md2man-v2
+ (package
+ (name "go-github-com-cpuguy83-go-md2man-v2")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cpuguy83/go-md2man.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0r1f7v475dxxgzqci1mxfliwadcrk86ippflx9n411325l4g3ghv"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/cpuguy83/go-md2man"))
+ (native-inputs
+ `(("go-github-com-shurcool-sanitized-anchor-name"
+ ,go-github-com-shurcool-sanitized-anchor-name)
+ ("go-github-com-russross-blackfriday-v2"
+ ,go-github-com-russross-blackfriday-v2)
+ ("go-github-com-pmezard-go-difflib"
+ ,go-github-com-pmezard-go-difflib)))
+ (home-page
+ "https://github.com/cpuguy83/go-md2man")
+ (synopsis "Convert Markdown into Man pages")
+ (description "This package converts Markdown into Roff Man pages.")
+ (license license:expat)))
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 12/25] gnu: Add go-github-com-enescakir-emoji.
(address . 47539@debbugs.gnu.org)
cff8f22c29b383b4448d036f792ee7896e8d4a7e.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-enescakir-emoji): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ee4a94c613..289685ef4c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7343,3 +7343,27 @@ substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
(synopsis "Convert Markdown into Man pages")
(description "This package converts Markdown into Roff Man pages.")
(license license:expat)))
+
+(define-public go-github-com-enescakir-emoji
+ (package
+ (name "go-github-com-enescakir-emoji")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/enescakir/emoji.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1xnisfsn94izcjhl4xywd971av4b5v1n67figp16wh443lhihxky"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/enescakir/emoji"))
+ (home-page "https://github.com/enescakir/emoji")
+ (synopsis "Minimalistic emoji package for Go")
+ (description "This package provides a minimalistic emoji library for
+Go. It lets you use emoji characters in strings.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 13/25] gnu: Add go-github-com-gabriel-vasile-mimetype.
(address . 47539@debbugs.gnu.org)
1bcd355c58e0f9eb20973ca783fec866c11005af.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-gabriel-vasile-mimetype): New variable.
---
gnu/packages/golang.scm | 47 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 289685ef4c..7dfc098480 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7367,3 +7367,50 @@ substitutions, etc.), and it is safe for all utf-8 (unicode) input.")
Go. It lets you use emoji characters in strings.")
(license license:expat)))
+(define-public go-github-com-gabriel-vasile-mimetype
+ (package
+ (name "go-github-com-gabriel-vasile-mimetype")
+ (version "1.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gabriel-vasile/mimetype.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ysb0pjhyr9b7q2y39b5hpwsaidgfl42gd07yj34mgmb9wfjb7ch"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/gabriel-vasile/mimetype"
+ ;; FIXME: Cannot open 'supported_mimes.md'
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; The files are read-only
+ (add-before 'reset-gzip-timestamps 'make-gz-files-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each make-file-writable
+ (find-files (string-append (assoc-ref outputs "out"))
+ ".*\\.gz$"))
+ #t)))))
+
+ (home-page
+ "https://github.com/gabriel-vasile/mimetype")
+ (synopsis "A fast golang library for MIME type and file extension detection")
+ (description "This is a package for detecting MIME types and extensions
+based on magic numbers. Features include
+
+@itemize
+@item fast and precise MIME type and file extension detection
+@item long list of supported MIME types
+@item common file formats are prioritized
+@item small and simple API
+@item handles MIME type aliases
+@item thread safe
+@item low memory usage, besides the file header
+@end itemize")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 14/25] gnu: Add go-github-com-google-shlex.
(address . 47539@debbugs.gnu.org)
beb3dd6302f2528e1f526be6d95a2c102e906f2d.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-google-shlex): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 7dfc098480..857a524e69 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7414,3 +7414,26 @@ based on magic numbers. Features include
@end itemize")
(license license:expat)))
+(define-public go-github-com-google-shlex
+ (package
+ (name "go-github-com-google-shlex")
+ (version "0.0.0-20191202100458-e7afc7fbc510")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/shlex.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "14z8hqyik910wk2qwnzgz8mjsmiamxa0pj55ahbv0jx6j3dgvzfm"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/google/shlex"))
+ (home-page "https://github.com/google/shlex")
+ (synopsis "Simple lexer for Go")
+ (description "This library provides is a simple lexer for Go that supports
+shell-style quoting, commenting, and escaping.")
+ (license license:asl2.0)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 15/25] gnu: Add go-github-com-henvic-httpretty.
(address . 47539@debbugs.gnu.org)
b9331644fdfdbcfe6759d476f816c4c5bf5460ce.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-henvic-httpretty): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 857a524e69..31f7ead170 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7437,3 +7437,26 @@ based on magic numbers. Features include
shell-style quoting, commenting, and escaping.")
(license license:asl2.0)))
+(define-public go-github-com-henvic-httpretty
+ (package
+ (name "go-github-com-henvic-httpretty")
+ (version "0.0.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/henvic/httpretty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jbnj1x8wribayx65ssxigs9p88pi0cxg36h8qhqvqz1pqiygksa"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/henvic/httpretty"))
+ (home-page "https://github.com/henvic/httpretty")
+ (synopsis "Print the HTTP requests you make on your terminal")
+ (description "This packages prints the HTTP requests you make with Go
+pretty on your terminal.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 16/25] gnu: Add go-github-com-itchyny-go-flags.
(address . 47539@debbugs.gnu.org)
7306479767ccc3c9651c33952b6ae3280eb8a1dd.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-go-flags): New variable.
---
gnu/packages/golang.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 31f7ead170..720b9111bc 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7460,3 +7460,36 @@ shell-style quoting, commenting, and escaping.")
pretty on your terminal.")
(license license:expat)))
+(define-public go-github-com-itchyny-go-flags
+ (package
+ (name "go-github-com-itchyny-go-flags")
+ (version "1.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/go-flags.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0qfh7gn95aldlsigk72jl87npmwvx15kb7df1100d6j0nbakd8b5"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/itchyny/go-flags"
+ ;; Unable to find man page
+ #:tests? #f))
+ (native-inputs
+ `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
+ (home-page "https://github.com/itchyny/go-flags")
+ (synopsis "Go library for parsing command line arguments")
+ (description "This library provides similar functionality to the builtin
+flag library of Go, but provides much more functionality.
+
+Package flags provides an extensive command line option parser. The flags
+package is similar in functionality to the go builtin flag package but
+provides more options and uses reflection to provide a convenient and succinct
+way of specifying command line options.")
+ (license license:bsd-3)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 17/25] gnu: Add go-github-com-itchyny-timefmt-go.
(address . 47539@debbugs.gnu.org)
9c422e007cf75199899f0625aa64d7aab4f2a56b.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-timefmt-go): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 720b9111bc..24867cebb2 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7493,3 +7493,27 @@ provides more options and uses reflection to provide a convenient and succinct
way of specifying command line options.")
(license license:bsd-3)))
+(define-public go-github-com-itchyny-timefmt-go
+ (package
+ (name "go-github-com-itchyny-timefmt-go")
+ (version "0.1.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/timefmt-go.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hfpvmbmzp5zbzz84p030jzd00jclnf4zr16f9r5bbq7xlhncj0z"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/itchyny/timefmt-go"))
+ (home-page
+ "https://github.com/itchyny/timefmt-go")
+ (synopsis "Efficient time formatting library for Go")
+ (description "This package provides functions for formatting and parsing
+date time strings.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 18/25] gnu: Add go-github-com-itchyny-gojq.
(address . 47539@debbugs.gnu.org)
bdaef76a8b50e393a5204bf9ba5e7a8cfded43c5.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-itchyny-gojq): New variable.
---
gnu/packages/golang.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 24867cebb2..8327e328a0 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7517,3 +7517,41 @@ way of specifying command line options.")
date time strings.")
(license license:expat)))
+(define-public go-github-com-itchyny-gojq
+ (package
+ (name "go-github-com-itchyny-gojq")
+ (version "0.12.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/itchyny/gojq.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pxm341sgqkscwifpxlkvchz8ix3wivp80p59dv257kaa9diymgz"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/itchyny/gojq"))
+ (native-inputs
+ `(("go-gopkg-in-yaml-v3" ,go-gopkg-in-yaml-v3)
+ ("go-golang-org-x-sys" ,go-golang-org-x-sys)
+ ("go-github-com-mattn-go-runewidth"
+ ,go-github-com-mattn-go-runewidth)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-itchyny-go-flags"
+ ,go-github-com-itchyny-go-flags)
+ ("go-github-com-google-go-cmp-cmp"
+ ,go-github-com-google-go-cmp-cmp)))
+ (propagated-inputs
+ `(("go-github-com-itchyny-timefmt-go"
+ ,go-github-com-itchyny-timefmt-go)))
+ (home-page "https://github.com/itchyny/gojq")
+ (synopsis "Pure Go implementation of jq")
+ (description "This package provides an implementation of @command{jq}
+command written in Go language. It is also embedable as a library to other Go
+projects.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 19/25] gnu: Add go-github-com-mattn-go-runewidth.
(address . 47539@debbugs.gnu.org)
c60d79e7d55a0345de6809d9e983386e1c09dbd1.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-mattn-go-runewidth): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8327e328a0..9e3d9174c1 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7555,3 +7555,29 @@ command written in Go language. It is also embedable as a library to other Go
projects.")
(license license:expat)))
+(define-public go-github-com-mattn-go-runewidth
+ (package
+ (name "go-github-com-mattn-go-runewidth")
+ (version "0.0.10")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mattn/go-runewidth.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jh9552ppqvkdfni7x623n0x5mbiaqqhjhmr0zkh28x56k4ysii4"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/mattn/go-runewidth"))
+ (native-inputs
+ `(("go-github-com-rivo-uniseg"
+ ,go-github-com-rivo-uniseg)))
+ (home-page "https://github.com/mattn/go-runewidth")
+ (synopsis "Functions to get fixed width of the character or string")
+ (description "This package provides functions to get fixed width of the
+character or string.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 20/25] gnu: Add go-github-com-rivo-uniseg.
(address . 47539@debbugs.gnu.org)
721cc7ef4d479d79c27b1bc9de79318ed2df357d.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-rivo-uniseg): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9e3d9174c1..d66ee2050e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7581,3 +7581,26 @@ projects.")
character or string.")
(license license:expat)))
+(define-public go-github-com-rivo-uniseg
+ (package
+ (name "go-github-com-rivo-uniseg")
+ (version "0.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rivo/uniseg.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0j7h22vfmjj562vr8gpsyrkrwp1pq9ayh5fylv24skxb467g9f0q"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/rivo/uniseg"))
+ (home-page "https://github.com/rivo/uniseg")
+ (synopsis "Unicode Text Segmentation for Go")
+ (description "This package implements Unicode Text Segmentation according
+to @url{https://unicode.org/reports/tr29/,Unicode Standard Annex #29}.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 21/25] gnu: Add go-github-com-shurcool-githubv4.
(address . 47539@debbugs.gnu.org)
86b3245a4b2187297721ea2af0ab5c44db4ee4a9.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-shurcool-githubv4): New variable.
---
gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index d66ee2050e..a2f2bf45c9 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7604,3 +7604,35 @@ character or string.")
to @url{https://unicode.org/reports/tr29/,Unicode Standard Annex #29}.")
(license license:expat)))
+(define-public go-github-com-shurcool-githubv4
+ (package
+ (name "go-github-com-shurcool-githubv4")
+ (version "0.0.0-20201206200315-234843c633fa")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/shurcooL/githubv4.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jmmjv95vcm9vl5zpvwv77pq3mhf2j2vxc7pj75yfniymp2dh5mi"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/shurcooL/githubv4"))
+ (native-inputs
+ `(("go-github-com-shurcooL-graphql" ,go-github-com-shurcool-graphql)
+ ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)))
+ (home-page "https://github.com/shurcooL/githubv4")
+ (synopsis "Client library for accessing the GitHub GraphQL API v4")
+ (description "This package is a client library for accessing the GitHub
+GraphQL API v4. It focuses on the following things:
+
+@itemize
+@item Friendly, simple and powerful API.
+@item Correctness, high performance and efficiency.
+@item Support for all of GitHub GraphQL API v4 via code generation from schema.
+@end itemize")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:23
[PATCH v3 22/25] gnu: Add go-gopkg-in-yaml-v3.
(address . 47539@debbugs.gnu.org)
c6c15bf035b2f1f3aceaca374e2e3816b78e777c.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-gopkg-in-yaml-v3): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a2f2bf45c9..9182fb183f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7636,3 +7636,29 @@ GraphQL API v4. It focuses on the following things:
@end itemize")
(license license:expat)))
+(define-public go-gopkg-in-yaml-v3
+ (package
+ (name "go-gopkg-in-yaml-v3")
+ (version "3.0.0-20210107192922-496545a6307b")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gopkg.in/yaml.v3")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g"))))
+ (build-system go-build-system)
+ (arguments '(#:import-path "gopkg.in/yaml.v3"))
+ (native-inputs
+ `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)))
+ (home-page "https://gopkg.in/yaml.v3")
+ (synopsis "YAML support for the Go language")
+ (description "This library enables Go programs to comfortably encode and
+decode YAML values. It is based on a pure Go port of the well-known libyaml C
+library to parse and generate YAML data quickly and reliably.")
+ (license (list license:expat
+ license:asl2.0))))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:24
[PATCH v3 23/25] gnu: Add go-github-com-shurcool-graphql.
(address . 47539@debbugs.gnu.org)
7dcb29b0f60d2a14a6a2f9cf358f113736b10aa1.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-shurcool-graphql): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9182fb183f..b4195d1c6f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7662,3 +7662,27 @@ library to parse and generate YAML data quickly and reliably.")
(license (list license:expat
license:asl2.0))))
+(define-public go-github-com-shurcool-graphql
+ (package
+ (name "go-github-com-shurcool-graphql")
+ (version "0.0.0-20200928012149-18c5c3165e3a")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/shurcooL/graphql.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0psxc2q3qsh1lfag11m2gz54fzzvlss5znyf34aars94igsjywzx"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/shurcooL/graphql"))
+ (native-inputs
+ `(("go-golang-org-x-net" ,go-golang-org-x-net)))
+ (home-page "https://github.com/shurcooL/graphql")
+ (synopsis "GraphQL client implementation")
+ (description "This package provides a GraphQL client implementation.")
+ (license license:expat)))
+
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:24
[PATCH v3 24/25] gnu: Add go-github-com-cli-shurcool-graphql.
(address . 47539@debbugs.gnu.org)
667ee0352f33503cc950ba70ccf714a0123ba705.1618845646.git.public@yoctocell.xyz
* gnu/packages/golang.scm (go-github-com-cli-shurcool-graphql): New variable.
---
gnu/packages/golang.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b4195d1c6f..642b364bcd 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7686,3 +7686,22 @@ library to parse and generate YAML data quickly and reliably.")
(description "This package provides a GraphQL client implementation.")
(license license:expat)))
+;; GitHub's fork of go-github-com-shurcool-graphql, used by the 'github-cli'
+(define-public go-github-com-cli-shurcool-graphql
+ (hidden-package
+ (package
+ (inherit go-github-com-shurcool-graphql)
+ (name "go-github-com-cli-shurcool-graphql")
+ ;; Use the commit from the 'named-queries' branch
+ (version "0.0.0-20200707151639-0f7232a2bf7e")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/shurcooL-graphql.git")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19dv1zprs9zv5gnwql29r7lym08gh2jwkz0w0f62823b57m1rjp6"))))
+ (home-page "https://github.com/cli/shurcooL-graphql"))))
--
2.31.1
X
X
Xinglu Chen wrote on 19 Apr 2021 17:24
[PATCH v3 25/25] gnu: Add github-cli.
(address . 47539@debbugs.gnu.org)
fb4e1981f199dc33f8294f2b0e180b2245b814d5.1618845646.git.public@yoctocell.xyz
* gnu/packages/version-control.scm (github-cli): New variable.
---
gnu/packages/version-control.scm | 145 +++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+)

Toggle diff (165 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index ebddd9522a..da6f71ccfe 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -118,6 +118,7 @@
#:use-module (gnu packages sdl)
#:use-module (gnu packages swig)
#:use-module (gnu packages sync)
+ #:use-module ((gnu packages syncthing) #:select (go-github-com-kballard-go-shellquote))
#:use-module (gnu packages tcl)
#:use-module (gnu packages textutils)
#:use-module (gnu packages time)
@@ -3021,6 +3022,150 @@ commit message side by side
If several repos are related, it helps to see their status together.")
(license license:expat))))
+(define-public github-cli
+ (package
+ (name "github-cli")
+ (version "1.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cli/cli.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "009jh1i1ji7d773ismifdw4qvwlb8s1zn14d0n84j9h3n0hyynbc"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path
+ "github.com/cli/cli/cmd/gh"
+ #:unpack-path
+ "github.com/cli/cli"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-safeexec
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion "src/github.com/cli/cli/"
+ ;; 'github.com/cli/safeexec' is only used for Windows, we
+ ;; replace it with the regular 'os/exec'. See
+ ;; <https://issues.guix.gnu.org/47539> for discussion.
+ (substitute* '("pkg/cmd/alias/expand/expand.go"
+ "script/build.go")
+ (("github.com/cli/safeexec") "os/exec")
+ (("safeexec") "exec"))
+ ;; These files have already imported 'os/exec', meaning that
+ ;; 'os/exec' would get imported twice, causing an error.
+ ;; Instead, we just remove the 'github.com/cli/safeexec'.
+ (substitute* '("cmd/gh/main.go"
+ "git/git.go"
+ "pkg/iostreams/iostreams.go"
+ "pkg/cmd/auth/shared/ssh_keys.go"
+ "pkg/cmd/pr/checkout/checkout.go"
+ "pkg/cmdutil/web_browser.go"
+ "pkg/surveyext/editor_manual.go")
+ (("\"github.com/cli/safeexec\"") "")
+ (("safeexec") "exec"))))))))
+ (native-inputs
+ `(("go-github-com-cli-shurcool-graphql"
+ ,go-github-com-cli-shurcool-graphql)
+ ("go-gopkg-in-yaml-v3" ,go-gopkg-in-yaml-v3)
+ ("go-golang-org-x-text" ,go-golang-org-x-text)
+ ("go-golang-org-x-sync" ,go-golang-org-x-sync)
+ ("go-golang-org-x-crypto"
+ ,go-golang-org-x-crypto)
+ ("go-github-com-stretchr-testify"
+ ,go-github-com-stretchr-testify)
+ ("go-github-com-spf13-pflag"
+ ,go-github-com-spf13-pflag)
+ ("go-github-com-spf13-cobra"
+ ,go-github-com-spf13-cobra)
+ ("go-github-com-shurcool-githubv4"
+ ,go-github-com-shurcool-githubv4)
+ ("go-github-com-rivo-uniseg"
+ ,go-github-com-rivo-uniseg)
+ ("go-github-com-muesli-termenv"
+ ,go-github-com-muesli-termenv)
+ ("go-github-com-mitchellh-go-homedir"
+ ,go-github-com-mitchellh-go-homedir)
+ ("go-github-com-mgutz-ansi"
+ ,go-github-com-mgutz-ansi)
+ ("go-github-com-mattn-go-runewidth"
+ ,go-github-com-mattn-go-runewidth)
+ ("go-github-com-mattn-go-isatty"
+ ,go-github-com-mattn-go-isatty)
+ ("go-github-com-mattn-go-colorable"
+ ,go-github-com-mattn-go-colorable)
+ ("go-github-com-kballard-go-shellquote"
+ ,go-github-com-kballard-go-shellquote)
+ ("go-github-com-itchyny-gojq"
+ ,go-github-com-itchyny-gojq)
+ ("go-github-com-henvic-httpretty"
+ ,go-github-com-henvic-httpretty)
+ ("go-github-com-hashicorp-go-version"
+ ,go-github-com-hashicorp-go-version)
+ ("go-github-com-google-shlex"
+ ,go-github-com-google-shlex)
+ ("go-github-com-google-go-cmp-cmp"
+ ,go-github-com-google-go-cmp-cmp)
+ ("go-github-com-gabriel-vasile-mimetype"
+ ,go-github-com-gabriel-vasile-mimetype)
+ ("go-github-com-enescakir-emoji"
+ ,go-github-com-enescakir-emoji)
+ ("go-github-com-cpuguy83-go-md2man-v2"
+ ,go-github-com-cpuguy83-go-md2man-v2)
+ ("go-github-com-cli-oauth"
+ ,go-github-com-cli-oauth)
+ ("go-github-com-cli-browser"
+ ,go-github-com-cli-browser)
+ ("go-github-com-briandowns-spinner"
+ ,go-github-com-briandowns-spinner)
+ ("go-github-com-makenowjust-heredoc"
+ ,go-github-com-makenowjust-heredoc)
+ ("go-github-com-alecaivazis-survey-v2"
+ ,go-github-com-alecaivazis-survey-v2)
+ ("go-github-com-charmbracelet-glamour"
+ ,go-github-com-charmbracelet-glamour)
+ ("go-github-com-alecthomas-chroma"
+ ,go-github-com-alecthomas-chroma)
+ ("go-github-com-google-goterm"
+ ,go-github-com-google-goterm)
+ ("go-github-com-aymerick-douceur"
+ ,go-github-com-aymerick-douceur)
+ ("go-github-com-danwakefield-fnmatch"
+ ,go-github-com-danwakefield-fnmatch)
+ ("go-github-com-chris-ramon-douceur"
+ ,go-github-com-chris-ramon-douceur)
+ ("go-github-com-gorilla-css"
+ ,go-github-com-gorilla-css)
+ ("go-golang-org-colorful"
+ ,go-golang-org-colorful)
+ ("go-golang-org-x-net"
+ ,go-golang-org-x-net)
+ ("go-github-com-muesli-reflow-ansi"
+ ,go-github-com-muesli-reflow-ansi)
+ ("go-github-com-microcosm-cc-bluemonday"
+ ,go-github-com-microcosm-cc-bluemonday)
+ ("go-github-com-muesli-reflow-wordwrap"
+ ,go-github-com-muesli-reflow-wordwrap)
+ ("go-github-com-yuin-goldmark"
+ ,go-github-com-yuin-goldmark)
+ ("go-github-com-dlclark-regexp2"
+ ,go-github-com-dlclark-regexp2)
+ ("go-github-com-muesli-reflow-indent"
+ ,go-github-com-muesli-reflow-indent)
+ ("go-github-com-muesli-reflow-padding"
+ ,go-github-com-muesli-reflow-padding)
+ ("go-github-com-olekukonko-tablewriter"
+ ,go-github-com-olekukonko-tablewriter)))
+ (home-page "https://github.com/cli/cli")
+ (synopsis "CLI interface to GitHub")
+ (description "This package provides the @command{gh} command, an interface
+to GitHub on the command line. It brings pull requests, issues, and other
+GitHub concepts to the terminal next to where you are already working with Git
+and your code.")
+ (license license:expat)))
+
(define-public ghq
(package
(name "ghq")
--
2.31.1
S
S
Sharlatan Hellseher wrote on 20 Apr 2021 00:37
(address . 47539@debbugs.gnu.org)
CAO+9K5rJjvr0uZt6vg00OegAampE2LYZ+9U=E-p9X0jGpz7+QQ@mail.gmail.com
For the Glang package where version is not defined
Toggle snippet (4 lines)
+(define-public go-github-com-shurcool-githubv4
+ (package+ (name "go-github-com-shurcool-githubv4")
+ (version "0.0.0-20201206200315-234843c633fa")
It's better to use latest commit (check any of gnu/packages/golang.scm)
Toggle snippet (7 lines)
(define-public go-golang-org-x-image
(let ((commit "58c23975cae11f062d4b3b0c143fe248faac195d")
(revision "1"))
(package
(name "go-golang-org-x-image")
(version (git-version "0.0.0" revision commit))
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
X
X
Xinglu Chen wrote on 20 Apr 2021 07:26
87y2dd8r18.fsf@yoctocell.xyz
On Mon, Apr 19 2021, Sharlatan Hellseher wrote:

Toggle quote (10 lines)
> For the Glang package where version is not defined
>
> --8<---------------cut here---------------start------------->8---
> +(define-public go-github-com-shurcool-githubv4
> + (package+ (name "go-github-com-shurcool-githubv4")
> + (version "0.0.0-20201206200315-234843c633fa")
> --8<---------------cut here---------------start------------->8---
>
> It's better to use latest commit (check any of gnu/packages/golang.scm)

The github-cli package specifies an exact revision for some of its
dependencies[1], and thats what the Go importer generated. Should I use
the latest commit anyway?

L
L
Leo Famulari wrote on 20 Apr 2021 07:34
(name . Xinglu Chen)(address . public@yoctocell.xyz)
YH5n3+6eDcOadxmB@jasmine.lan
On Tue, Apr 20, 2021 at 07:26:59AM +0200, Xinglu Chen wrote:
Toggle quote (6 lines)
> The github-cli package specifies an exact revision for some of its
> dependencies[1], and thats what the Go importer generated. Should I use
> the latest commit anyway?
>
> [1]: https://github.com/cli/cli/blob/trunk/go.mod

You should always use what's specified in go.mod.

Golang software is like that: You should use exact versions of
dependencies.
X
X
Xinglu Chen wrote on 20 Apr 2021 09:34
(name . Leo Famulari)(address . leo@famulari.name)
87lf9d8l43.fsf@yoctocell.xyz
On Tue, Apr 20 2021, Leo Famulari wrote:

Toggle quote (12 lines)
> On Tue, Apr 20, 2021 at 07:26:59AM +0200, Xinglu Chen wrote:
>> The github-cli package specifies an exact revision for some of its
>> dependencies[1], and thats what the Go importer generated. Should I use
>> the latest commit anyway?
>>
>> [1]: https://github.com/cli/cli/blob/trunk/go.mod
>
> You should always use what's specified in go.mod.
>
> Golang software is like that: You should use exact versions of
> dependencies.

Ok, that’s what I did. :)
L
L
Leo Prikler wrote on 21 May 2021 19:08
d6eeb0a93eb46c3e7323eb3f308bc9b7b14728ea.camel@student.tugraz.at
Am Dienstag, den 20.04.2021, 09:34 +0200 schrieb Xinglu Chen:
Toggle quote (17 lines)
> On Tue, Apr 20 2021, Leo Famulari wrote:
>
> > On Tue, Apr 20, 2021 at 07:26:59AM +0200, Xinglu Chen wrote:
> > > The github-cli package specifies an exact revision for some of
> > > its
> > > dependencies[1], and thats what the Go importer
> > > generated. Should I use
> > > the latest commit anyway?
> > >
> > > [1]: https://github.com/cli/cli/blob/trunk/go.mod
> >
> > You should always use what's specified in go.mod.
> >
> > Golang software is like that: You should use exact versions of
> > dependencies.
>
> Ok, that’s what I did. :)
It seems patchwork does not want to process this patch in the way I
want it to process it.
@lfam: Does this patch look good to you? If so, can we apply it?

Regards,
Leo
L
L
Leo Famulari wrote on 21 May 2021 22:34
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
YKgZa2/dL2FRasyO@jasmine.lan
On Fri, May 21, 2021 at 07:08:49PM +0200, Leo Prikler wrote:
Toggle quote (2 lines)
> @lfam: Does this patch look good to you? If so, can we apply it?

I notice that (most of?) the new packages use native-inputs for their
dependencies.

If these dependencies are used at run-time, I would propagate them
instead. This way, they will be available in the build environment of
packages that depend on the package that is using them, which matters
for our go-build-system, where everything is built from scratch in each
package. If I remember correctly, that is...

Otherwise, if they pass `guix lint`, the licenses have been checked, and
the software works, LGTM.
X
X
Xinglu Chen wrote on 5 Jun 2021 21:16
(address . 47539@debbugs.gnu.org)
87mts486ln.fsf@yoctocell.xyz
On Fri, May 21 2021, Leo Famulari wrote:

Toggle quote (12 lines)
> On Fri, May 21, 2021 at 07:08:49PM +0200, Leo Prikler wrote:
>> @lfam: Does this patch look good to you? If so, can we apply it?
>
> I notice that (most of?) the new packages use native-inputs for their
> dependencies.
>
> If these dependencies are used at run-time, I would propagate them
> instead. This way, they will be available in the build environment of
> packages that depend on the package that is using them, which matters
> for our go-build-system, where everything is built from scratch in each
> package. If I remember correctly, that is...

I am not familiar with the Go ecosystem, is there a way to tell if a
dependency is used at runtime?

Sorry for the delay.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmC7zZQVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x514cP/iU3YE/2mIzPyrWEmROcYr2FF3Lb
U84geR60dYiNYbGcWoBihjn5fbJSkTFEZjtltkaQU19vThFcWzhwa5Y6A2tKGsZX
EUF5VXzSgEMQ/WJrozTdY2heIJMmVjiFOyOHdw+1r4H9Opvdv/wHSZ5VhzH69gJ9
bZXJcgXjNwSlnEaiiw43WsSUZYmuLYNJtNOFwXhqdi0wZ6cIdwB8ulktJ40KyOMk
MD9h97ZLOXiedeLR9sXxC5SxosCZawIOY3W5+obbUiXu8CK6D3p4jYwq7B5YGmKZ
q6vNuRQfS2BZZOS0noaQDWDIHtU2+bU22RbIXud2g1huGSXIsUHbeY2thUq/msV6
yvGdjFNp8QZ05kjlNy+bH+0U7fWStBqegfroxL87rkeIS3MNZ1rCFFWUON3jEEOe
jLtcVHeGxdGV66jiamzOD8dEOkZ+mCOJwrxLPWlk1OaPqVgsC8iGs4vJmSye/oqx
2rorTePYmSE4R+3rxGaLjZc/V8pD0yYoo7nmR58WECV7M0TratWFvEBQvWGzkeeV
BtvjWNrdZjJWvLOALdahAOz3qbs6tWYTF25PS5P/yFFWquLXynctQE+VHgmkMtJH
XpxV8X7F1BP52+i9gvpGe/bz0ZEmak9DrP+FlTjyKr6/kgRWaobVvHIh0dK0ZwHd
FoFiUCQh8osrYp5T
=zAwF
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 6 Jun 2021 19:26
(name . Xinglu Chen)(address . public@yoctocell.xyz)
YL0FUavYzNcSMozk@jasmine.lan
On Sat, Jun 05, 2021 at 09:16:36PM +0200, Xinglu Chen wrote:
Toggle quote (13 lines)
> On Fri, May 21 2021, Leo Famulari wrote:
> > I notice that (most of?) the new packages use native-inputs for their
> > dependencies.
> >
> > If these dependencies are used at run-time, I would propagate them
> > instead. This way, they will be available in the build environment of
> > packages that depend on the package that is using them, which matters
> > for our go-build-system, where everything is built from scratch in each
> > package. If I remember correctly, that is...
>
> I am not familiar with the Go ecosystem, is there a way to tell if a
> dependency is used at runtime?

Remember, Go uses static compilation, so Guix's concept of "runtime"
dependencies doesn't apply to Go like it does for other languages.

For Go, you'll know that a dependency was missing, because the build
will fail without it.

Our current go-build-system implementation rebuilds every dependency
from source when it is used while building another package
(inefficient!).

If foo requires bar, and baz depends on foo, then bar needs to be
available when building baz. That is because foo will be rebuilt while
building baz.

We must either propagate bar from foo, or make baz depend on it.
Technically, bar is a dependency of foo, so it is correct to propagate
it from foo.

You may also check if baz also depends on bar, by checking if baz tries
to import bar. Go software imports (or declares?) its dependencies by
importing them using "import paths" [0], as shown in this example:


The external or non-stdlib dependencies are named by what looks like a
URL. These URL-like "import paths" are the actual and unique names for
Go programs.

So, if baz also depends on bar, your grep in the baz source code will
return a match for the import path of bar; something like
'github.com/author/bar'.

Does that make sense? I'm happy to clarify things until it does :)

X
X
Xinglu Chen wrote on 7 Jun 2021 14:58
(name . Leo Famulari)(address . leo@famulari.name)
87pmwxu8z5.fsf@yoctocell.xyz
On Sun, Jun 06 2021, Leo Famulari wrote:

Toggle quote (20 lines)
> On Sat, Jun 05, 2021 at 09:16:36PM +0200, Xinglu Chen wrote:
>> On Fri, May 21 2021, Leo Famulari wrote:
>> > I notice that (most of?) the new packages use native-inputs for their
>> > dependencies.
>> >
>> > If these dependencies are used at run-time, I would propagate them
>> > instead. This way, they will be available in the build environment of
>> > packages that depend on the package that is using them, which matters
>> > for our go-build-system, where everything is built from scratch in each
>> > package. If I remember correctly, that is...
>>
>> I am not familiar with the Go ecosystem, is there a way to tell if a
>> dependency is used at runtime?
>
> Remember, Go uses static compilation, so Guix's concept of "runtime"
> dependencies doesn't apply to Go like it does for other languages.
>
> For Go, you'll know that a dependency was missing, because the build
> will fail without it.

Everything built fine the last time I was working on this, and I was
able to open a GitHub issue using the resulting ‘gh’ binary, so things
seem to be OK.

Toggle quote (4 lines)
> Our current go-build-system implementation rebuilds every dependency
> from source when it is used while building another package
> (inefficient!).

So kinda like what Cargo does? Go doesn’t seem to have the concept of
shared libraries, I guess?

Toggle quote (8 lines)
> If foo requires bar, and baz depends on foo, then bar needs to be
> available when building baz. That is because foo will be rebuilt while
> building baz.
>
> We must either propagate bar from foo, or make baz depend on it.
> Technically, bar is a dependency of foo, so it is correct to propagate
> it from foo.

So if A dependes on B which depends on C, and I want to build A, then C
has to be a ‘propagated-input’ for B? Did I get that right?

But if I just want to build B, should C still be a ‘propagated-input’
for B?

Toggle quote (4 lines)
> You may also check if baz also depends on bar, by checking if baz tries
> to import bar. Go software imports (or declares?) its dependencies by
> importing them using "import paths" [0], as shown in this example:

Right, but shouldn’t it be enough to just look at the content of the
go.mod file, won’t it list all the dependencies of the package?
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmC+GA8VHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5VxkP/ikDJEbnI5VByH1w+QlkP+nhAHas
JeDQ0PTjvR01sDjySjKEtqLl5/PoNALBAPMXj6yt1of7RWO4eRbKuehgGlCGYhXN
A45H3NwjIj6nhNcjVgACZR25mN9hnjrzb5NFC6GBNpas56e3MoXoqYxz2CHP6uL+
o3w0ill+OTWKe0FOLJsJngS/xIX+PfYNCiRp5yn+LnBDyM+WaBzHBy2L/ILAw6kK
sqqECbxclcx78F/qpucIQL7lUNSkv2HELJqOxGUc1nFgD634Fhq6MKGQoHO38yHL
49utO6johl+LY73aLgvFRVrHHwOQKroMH4ny/Kptm9V7grdlCAefGcTPt5gSqAv2
5dirSlj21Ay7+4I23Dy1g+/a2/9BeKiN19untZGM61fSnoISdEoQVqEeX2aaz3dB
b9xJhM05lnClxOkHIxYHoxbFIE9XUZS35UuDDFtbH7kiMZTGDwQDfMFyR4cWAJbS
te0ynRsIDwt5YsVeH6Ip9u6VWa60NOswLsRvPQzpQW6NfyYEoIeYVa72LKkPI1i9
ZrAR4juCnomeM2i7Wm/dHSjNHzmpWLtxT4ON+d2IMPq6lFbmxWwYFd7NwN/aFk7L
upd1jowSjjon0k4m1RVQOAkRicO/loYtDHhOvfez4TwX0TQQSSbQayS9sy2bLgOa
aPEgCeGhRt8J5aqY
=bquT
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 7 Jun 2021 15:11
(name . Leo Famulari)(address . leo@famulari.name)
87lf7lu8di.fsf@yoctocell.xyz
On Mon, Jun 07 2021, Xinglu Chen wrote:

Toggle quote (30 lines)
> On Sun, Jun 06 2021, Leo Famulari wrote:
>
>> On Sat, Jun 05, 2021 at 09:16:36PM +0200, Xinglu Chen wrote:
>>> On Fri, May 21 2021, Leo Famulari wrote:
>>> > I notice that (most of?) the new packages use native-inputs for their
>>> > dependencies.
>>> >
>>> > If these dependencies are used at run-time, I would propagate them
>>> > instead. This way, they will be available in the build environment of
>>> > packages that depend on the package that is using them, which matters
>>> > for our go-build-system, where everything is built from scratch in each
>>> > package. If I remember correctly, that is...
>>>
>>> I am not familiar with the Go ecosystem, is there a way to tell if a
>>> dependency is used at runtime?
>>
>> If foo requires bar, and baz depends on foo, then bar needs to be
>> available when building baz. That is because foo will be rebuilt while
>> building baz.
>>
>> We must either propagate bar from foo, or make baz depend on it.
>> Technically, bar is a dependency of foo, so it is correct to propagate
>> it from foo.
>
> So if A dependes on B which depends on C, and I want to build A, then C
> has to be a ‘propagated-input’ for B? Did I get that right?
>
> But if I just want to build B, should C still be a ‘propagated-input’
> for B?

Since a new version of the ‘github-cli’ package is out, I ran
‘./pre-inst-env guix import go -r github.com/cli/cli’ to see if it had
any new dependencies. I noticed that the Go importer put all the
dependencies as ‘propagated-input’ instead of ‘native-input’ (which it
did before).

My guess is that basically everything should be propagated?
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmC+GxoVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5bioP/1Rs79IVBampO8bbXnX1w7mlQXii
bgGjxxmLuyfBPFzdMLVUc3wEP+1DH4ZLSsSQ5ENL/WONa8gceJXuAmyjaoL7giBz
AS2wYcU7cvpUk8dNHpXUeHXgWMVPYP3eRKtdRPXb+eKy+fD8SiUKnifmk8dhwJGS
Y87C9IVErXZSTZazy/5ChxZNwj+6hUbq9ksw/48uox2bRy6qp9caOJmpV3+bGMel
esldk1Cl7uOW3FyhWQ2KStMpb7GcuK0iYHc9bigMENJCoq50gPNoPPvo06f+UTYN
Ho1OVpoAl4s/yFUDr2K3fWwYNXOt9sd2bKuvIbNqaBGdzNIOBESHVETVYX3HiUQt
i3K9gccvz6eRScPPn82SeEeYVi0GoyzZs4jFcAy78c2C+QObTWhJqI/KstDQzhKz
DqfQ4eU6E6TfAZ8qWnhVgoXJJyqLkaP1cYP1lok4tFfDaJhuFf8RNRKd6QxpcmrK
SWPteZdEXZjWEPh5Ws2YN93hnVTnmogrIHKzI9aqQFgDK6/3726TckYQN7wcNlll
pTo5pGOw0ui12F1791ll7kyMYhG9s8gE6QLcwpDegVPFaxN6TR7w9uONU1JFvc7L
priSBKtq9jzuZxxbj3U0f+qJhFw8VgtWKL2R8wZUxWcTmcCqGJiUxojc2GMS94E8
ZQsQpmZGZhMk2Axj
=QbH6
-----END PGP SIGNATURE-----

L
L
Leo Prikler wrote on 7 Jun 2021 15:33
(address . 47539@debbugs.gnu.org)
5346fb46fb1e846b4b3aca1ef5e44b544a227732.camel@student.tugraz.at
Am Montag, den 07.06.2021, 15:11 +0200 schrieb Xinglu Chen:
Toggle quote (51 lines)
> On Mon, Jun 07 2021, Xinglu Chen wrote:
>
> > On Sun, Jun 06 2021, Leo Famulari wrote:
> >
> > > On Sat, Jun 05, 2021 at 09:16:36PM +0200, Xinglu Chen wrote:
> > > > On Fri, May 21 2021, Leo Famulari wrote:
> > > > > I notice that (most of?) the new packages use native-inputs
> > > > > for their
> > > > > dependencies.
> > > > >
> > > > > If these dependencies are used at run-time, I would propagate
> > > > > them
> > > > > instead. This way, they will be available in the build
> > > > > environment of
> > > > > packages that depend on the package that is using them, which
> > > > > matters
> > > > > for our go-build-system, where everything is built from
> > > > > scratch in each
> > > > > package. If I remember correctly, that is...
> > > >
> > > > I am not familiar with the Go ecosystem, is there a way to tell
> > > > if a
> > > > dependency is used at runtime?
> > >
> > > If foo requires bar, and baz depends on foo, then bar needs to be
> > > available when building baz. That is because foo will be rebuilt
> > > while
> > > building baz.
> > >
> > > We must either propagate bar from foo, or make baz depend on it.
> > > Technically, bar is a dependency of foo, so it is correct to
> > > propagate
> > > it from foo.
> >
> > So if A dependes on B which depends on C, and I want to build A,
> > then C
> > has to be a ‘propagated-input’ for B? Did I get that right?
> >
> > But if I just want to build B, should C still be a ‘propagated-
> > input’
> > for B?
>
> Since a new version of the ‘github-cli’ package is out, I ran
> ‘./pre-inst-env guix import go -r github.com/cli/cli’ to see if it
> had
> any new dependencies. I noticed that the Go importer put all the
> dependencies as ‘propagated-input’ instead of ‘native-input’ (which
> it
> did before).
>
> My guess is that basically everything should be propagated?
Do cross-check with the output of the Go importer. While there were
some modifications that we made (e.g. the safeexec thing), the Go
importer probably does "the right thing™".

Regards,
Leo
L
L
Leo Famulari wrote on 7 Jun 2021 19:19
(name . Xinglu Chen)(address . public@yoctocell.xyz)
YL5VCx0XjfKgweYr@jasmine.lan
On Mon, Jun 07, 2021 at 02:58:54PM +0200, Xinglu Chen wrote:
Toggle quote (3 lines)
> So kinda like what Cargo does? Go doesn’t seem to have the concept of
> shared libraries, I guess?

Apparently it has some concept of them, but it seems that it does static
compilation by default. This is touted as one of the strengths of Go: it
creates fully independent run-anywhere binaries.

Toggle quote (3 lines)
> So if A dependes on B which depends on C, and I want to build A, then C
> has to be a ‘propagated-input’ for B? Did I get that right?

Yes, for our go-build-system.

Toggle quote (3 lines)
> But if I just want to build B, should C still be a ‘propagated-input’
> for B?

Yes, unless B is only an end-user executable, such as Syncthing. In that
case it doesn't matter if you use inputs or propagated-inputs.

Toggle quote (3 lines)
> Right, but shouldn’t it be enough to just look at the content of the
> go.mod file, won’t it list all the dependencies of the package?

Yes, that should work too! But the module imports are the ultimate
"source of truth" in terms of what is used.

Sometimes you will find a Go program that has extraneous things in
go.mod. They are listed in go.mod but not actually imported anywhere,
and thus not used.

Also, I started learning about Go before Go modules were introduced, so
my admittedly weak knowledge is now even weaker. I only learned about Go
in order to do Guix packaging. If it sounds like I am wrong about
something, I probably am :)
L
L
Leo Prikler wrote on 15 Jul 2021 14:24
Re: [bug#47539] Add github-cli
(address . 47539@debbugs.gnu.org)
f7e80dab54a17b12ad03bc8f8cd335fbe960c30b.camel@student.tugraz.at
Hi everyone,

Am Montag, den 07.06.2021, 13:19 -0400 schrieb Leo Famulari:
Toggle quote (10 lines)
> > So if A dependes on B which depends on C, and I want to build A,
> > then C has to be a ‘propagated-input’ for B? Did I get that right?
>
> Yes, for our go-build-system.
>
> > But if I just want to build B, should C still be a ‘propagated-
> > input’ for B?
>
> Yes, unless B is only an end-user executable, such as Syncthing. In
> that case it doesn't matter if you use inputs or propagated-inputs.
For context, I think github-cli will probably be fine using inputs
instead of propagated inputs, but the rest down the chain might need to
be adjusted.

There has been some time since the last patch was sent and I sadly
doubt cbaines' patchwork will try to build this package. Is v3 good to
go to master? Should Xinglu send a v4? @Xinglu, are you still
interested in merging v3/creating a v4?

Regards,
Leo
X
X
Xinglu Chen wrote on 16 Jul 2021 19:20
(address . 47539@debbugs.gnu.org)
878s26p453.fsf@yoctocell.xyz
On Thu, Jul 15 2021, Leo Prikler wrote:

Toggle quote (22 lines)
> Hi everyone,
>
> Am Montag, den 07.06.2021, 13:19 -0400 schrieb Leo Famulari:
>> > So if A dependes on B which depends on C, and I want to build A,
>> > then C has to be a ‘propagated-input’ for B? Did I get that right?
>>
>> Yes, for our go-build-system.
>>
>> > But if I just want to build B, should C still be a ‘propagated-
>> > input’ for B?
>>
>> Yes, unless B is only an end-user executable, such as Syncthing. In
>> that case it doesn't matter if you use inputs or propagated-inputs.
> For context, I think github-cli will probably be fine using inputs
> instead of propagated inputs, but the rest down the chain might need to
> be adjusted.
>
> There has been some time since the last patch was sent and I sadly
> doubt cbaines' patchwork will try to build this package. Is v3 good to
> go to master? Should Xinglu send a v4? @Xinglu, are you still
> interested in merging v3/creating a v4?

A few weeks ago I tried to update ‘github-cli’ to the latest version,
but it required some new packages to be packaged, and I got stuck trying
to package one of them.

I don’t really have much interest in packaging it (well, Go packages in
general) anymore since I rarely interact with GitHub anyway. Unless
someone else would like to pick it up, I am OK with closing the bug.

Sorry for not following up on this.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDxv8gVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x550sQAIU6th8xlgBZs/N3WPm8YCiProQh
ZTXtETV/MX/ceFqPAN4EWJvXI2K4zrkP74X2yjk+Q4qsJYio29BR2JWIlSsKuakp
2iEjSN+AUwf0XSfRDMCruKY1FZRlFvbO6hk1A27ydvllwVGnzrWxMbw7TJkoPOS0
NqhiwPDS5kW6g8dxfXIVlY16XB1MaTPewAqUMr+4kxZ+Oqdhma8e3py2ZGTTuKgK
tpuPb573Q9Ag+a4RBTxTonnt5FHjOwB27TlCPA1WpQycBIrbB3kGKnYsU1T+ssGL
dmkcz97DMoVswyVltV3luInaLj/BMeX1/tF+Ri9oaid8MWSh5RwiaOpK/BdcW77q
kKCnrqqNfinVaddy3S7aO8+5r3hqPD7Egl+8gRP+GgPEHov0nRKiWLEI8zdIu4LX
vG8sdOPW4vbQLBMbCOtp+a7vnEoUxpYMtMuGQeMOfJeFgCeNCoCde85tkd55aZUb
LQOM9WRpX5+zlcnFFBfAfJ6B9SvDVUfpjpZkXJtTfAHGUbsBqwvdqbDZRjcyKsAT
hU9o9Fg3Q2iI3w1K3Vsj2ES8odpNCAJInBqYq/b8cb+YM12WoHbN0UBTMEy+EghY
9MUo6txX0YGPcGe23liqghYJVUwpFNaWcEPEIxmlh4Xibw+DNlDWi8+6DgQ2BmBb
UWrSt+ONZ1hgHWhW
=0Myc
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 47539
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