[PATCH 0/3] Add cf-tool

  • Done
  • quality assurance status badge
Details
2 participants
  • Luis Higino
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Luis Higino
Severity
normal
L
L
Luis Higino wrote on 1 Jun 06:25 +0200
(address . guix-patches@gnu.org)(name . Luis Higino)(address . luis.higino@dcc.ufmg.br)
cover.1717215802.git.luis.higino@dcc.ufmg.br
Hi Guix,

this patch series adds a couple Go libraries and the cf-tool[1] command line utility.


Luis Higino (3):
gnu: Add go-github-com-docopt-docopt-go.
gnu: Add go-github-com-k0kubun-go-ansi.
gnu: Add cf-tool.

gnu/packages/golang-xyz.scm | 25 ++++++++
gnu/packages/golang.scm | 25 ++++++++
.../patches/cf-tool-add-languages.patch | 22 +++++++
gnu/packages/web.scm | 63 +++++++++++++++++++
4 files changed, 135 insertions(+)
create mode 100644 gnu/packages/patches/cf-tool-add-languages.patch


base-commit: fba6896f625dcbeef112387fc90abe83acae1720
--
2.41.0
L
L
Luis Higino wrote on 1 Jun 07:06 +0200
[PATCH 1/3] gnu: Add go-github-com-docopt-docopt-go.
(address . 71305@debbugs.gnu.org)(name . Luis Higino)(address . luis.higino@dcc.ufmg.br)
96fd4a7bf830d7be221a14cc9bc245ac00e3a865.1717215802.git.luis.higino@dcc.ufmg.br
* gnu/packages/golang.scm (go-github-com-docopt-docopt-go): New variable.

Change-Id: I70ab7bce1a4ac13e1b63ecb72f5b7df0b8b94b69
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ab41508103..fa52798a25 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3279,6 +3279,31 @@ (define-public go-github-com-tj-docopt
(home-page "https://github.com/tj/docopt")
(license license:expat)))
+(define-public go-github-com-docopt-docopt-go
+ (let ((commit "ee0de3bc6815ee19d4a46c7eb90f829db0e014b1")
+ (revision "0"))
+ (package
+ (name "go-github-com-docopt-docopt-go")
+ (version (git-version "0.6.2" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/docopt/docopt.go")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0hlra7rmi5pmd7d93rv56ahiy4qkgmq8a6mz0jpadvbi5qh8lq6j"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/docopt/docopt-go"))
+ (home-page "https://github.com/docopt/docopt.go")
+ (synopsis "Implementation of docopt in the Go programming language")
+ (description
+ "Package docopt parses command-line arguments based on a help message.")
+ (license license:expat))))
+
(define-public govulncheck
(package
(name "govulncheck")
--
2.41.0
L
L
Luis Higino wrote on 1 Jun 07:06 +0200
[PATCH 2/3] gnu: Add go-github-com-k0kubun-go-ansi.
(address . 71305@debbugs.gnu.org)(name . Luis Higino)(address . luis.higino@dcc.ufmg.br)
9f5807e708108f358018b1c13bccfd3c9e0b9fb9.1717215802.git.luis.higino@dcc.ufmg.br
* gnu/packages/golang-xyz.scm (go-github-com-k0kubun-go-ansi): New variable.

Change-Id: I012a3b5c530f1fb7ee61e628fac216bdd966772c
---
gnu/packages/golang-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 0b869b39e3..047d650830 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -1299,6 +1299,31 @@ (define-public go-github-com-fatih-color
defined output to the standard output.")
(license license:expat)))
+(define-public go-github-com-k0kubun-go-ansi
+ (package
+ (name "go-github-com-k0kubun-go-ansi")
+ (version "0.0.0-20180517002512-3bf9e2903213")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/k0kubun/go-ansi")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "117afax4l268rbswf02icbgxncmd1pk2abkz7cv26iyszi8l26dq"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/k0kubun/go-ansi"))
+ (home-page "https://github.com/k0kubun/go-ansi")
+ (synopsis "Windows-portable ANSI escape sequence utility for Go language")
+ (description
+ "This library converts ANSI escape sequences to Windows API calls on
+Windows environment. You can easily use this feature by replacing fmt with
+ansi.")
+ (license license:expat)))
+
(define-public go-github-com-gabriel-vasile-mimetype
(package
(name "go-github-com-gabriel-vasile-mimetype")
--
2.41.0
L
L
Luis Higino wrote on 1 Jun 07:06 +0200
[PATCH 3/3] gnu: Add cf-tool.
(address . 71305@debbugs.gnu.org)(name . Luis Higino)(address . luis.higino@dcc.ufmg.br)
c9cd9182d13f5afe6c434ed45c9d70bceb79ec79.1717215802.git.luis.higino@dcc.ufmg.br
* gnu/packages/web.scm (cf-tool): New variable.

Change-Id: Ib64cf9f26b3b1f3d761fa897365fce07822c3b11
---
.../patches/cf-tool-add-languages.patch | 22 +++++++
gnu/packages/web.scm | 63 +++++++++++++++++++
2 files changed, 85 insertions(+)
create mode 100644 gnu/packages/patches/cf-tool-add-languages.patch

Toggle diff (104 lines)
diff --git a/gnu/packages/patches/cf-tool-add-languages.patch b/gnu/packages/patches/cf-tool-add-languages.patch
new file mode 100644
index 0000000000..a5dc0c8cfa
--- /dev/null
+++ b/gnu/packages/patches/cf-tool-add-languages.patch
@@ -0,0 +1,22 @@
+Add newer language options.
+
+diff --git a/client/langs.go b/tmp/langs.go
+index b09c69f..0695958 100644
+--- a/client/langs.go
++++ b/tmp/langs.go
+@@ -9,6 +9,7 @@ var Langs = map[string]string{
+ "42": "GNU G++11 5.1.0",
+ "50": "GNU G++14 6.4.0",
+ "54": "GNU G++17 7.3.0",
++ "89": "GNU G++20 13.2 (64 bit, winlibs)",
+ "2": "Microsoft Visual C++ 2010",
+ "59": "Microsoft Visual C++ 2017",
+ "9": "C# Mono 5.18",
+@@ -60,6 +61,7 @@ var LangsExt = map[string]string{
+ "GNU C++11": "cpp",
+ "GNU C++14": "cpp",
+ "GNU C++17": "cpp",
++ "GNU G++20": "cpp",
+ "MS C++": "cpp",
+ "MS C++ 2017": "cpp",
+ "Mono C#": "cs",
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index cbf270ec6b..8224522f4e 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -9314,6 +9314,69 @@ (define-public kiwix-tools
@end itemize\n")
(license license:gpl3+)))
+(define-public cf-tool
+ (package
+ (name "cf-tool")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/xalanq/cf-tool")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ad2mljjg4pr8jjk9i1asnld16xi1wdfnh25drngm3c590cmrnfj"))
+ (patches (search-patches "cf-tool-add-languages.patch"))
+ (modules '((guix build utils)))
+ ;; Remove assets and vendorized dependencies from checkout
+ (snippet '(begin
+ (delete-file-recursively "assets")
+ (delete-file-recursively "vendor")))))
+ (build-system go-build-system)
+ (inputs (list go-github-com-puerkitobio-goquery
+ go-github-com-docopt-docopt-go
+ go-github-com-fatih-color
+ go-github-com-k0kubun-go-ansi
+ go-github-com-mitchellh-go-homedir
+ go-github-com-olekukonko-tablewriter
+ go-github-com-sergi-go-diff
+ go-github-com-skratchdot-open-golang
+ go-golang-org-x-crypto
+ go-golang-org-x-term
+ go-github-com-shirou-gopsutil))
+ (arguments
+ (list
+ #:install-source? #f
+ #:go go-1.18
+ #:import-path "github.com/xalanq/cf-tool"
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'add-alternate-name
+ (lambda* _
+ (let ((bin (string-append #$output "/bin")))
+ (symlink (string-append bin "/cf-tool")
+ (string-append bin "/cf"))))))))
+ (home-page "https://github.com/xalanq/cf-tool")
+ (synopsis
+ "Command-line interface tool for @url{https://codeforces.com, Codeforces}")
+ (description
+ "Codeforces Tool is a command-line interface tool for
+@url{https://codeforces.com,Codeforces}. Its features include:
+@itemize
+@item Support Contests, Gym, Groups and acmsguru.
+@item Support all programming languages in Codeforces.
+@item Submit codes.
+@item Watch submissions' status dynamically.
+@item Fetch problems' samples.
+@item Compile and test locally.
+@item Clone all codes of someone.
+@item Generate codes from the specified template (including timestamp, author, etc.)
+@item List problems' stats of one contest.
+@item Use default web browser to open problems' pages, standings' page, etc.
+@item Setup a network proxy. Setup a mirror host.
+@end itemize")
+ (license license:expat)))
+
(define-public uriparser
(package
(name "uriparser")
--
2.41.0
S
S
Sharlatan Hellseher wrote on 11 Jun 11:32 +0200
[PATCH 0/3] Add cf-tool
(address . 71305-done@debbugs.gnu.org)
87r0d3su2t.fsf@gmail.com
Hi,

Thank you for the patches!

Pushed as ca9fa4a88a..21d631a3e8 to master with minor modifications.

- patches [3/3]
- [X] [PATCH 1/3] gnu: Add go-github-com-docopt-docopt-go.
- Move to golang-xyz
- Adjust Description
- [X] [PATCH 2/3] gnu: Add go-github-com-k0kubun-go-ansi.
- [X] [PATCH 3/3] gnu: Add cf-tool.
- Move to education
- Adjust package style

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmZoGboACgkQdtcnv/Ys
0rUaDQ//WmCb7h/OH4IDYogMuP5pAKttGRldYvidVbQA28eOfcs55bl5xUyZ0Fg2
w8JO56GAMMIozqzHSW/eqgdT8+7RRSe3Ppgv0kmVWNtrv/5rKGH6U8oid/Yd2fWm
rnHWqhiJzG5+PpTUwyqbC3XQlMSwatL+URm1VXDK5VzH6g0u1yN0+Z3DITnyBHmD
AlaIhFEdmrIDlJr91QxUKCUP4N6m5lzvIcmNczlrLg+nvVxxiw4uZyHuX8bwo+C/
TDG6paJEzng3ROnXYbBDBkt1GgxzMlUjidwkyQjeFrCwSt478/4DOrsBN3kBxvGH
1nYKBZ51NenWuVTEwfA1T12qo9iY2nV/0eswBtzE8fvyHcfgbNXHFxhtD08JSpsY
3Bfr+VdjqWWz2qe/dE+N+ZZwbLEK/xagjH1aY6cXBGfZvImDLxg9HPXhPxrJmRBH
m5CX3D+qGqDUaWxghrf8bgc6IpJbS9JlPNk7UZdmZBr6S9oiCJcJrn71093ffb/o
Pl20kLX+Q7aZJzHe5FPToE2lVF0E9y995wCYTF/9MqJLoj9/eTB6XDHjMj2mzt+v
GFutB8QSt/FPDTkgw03lgpHbC7TYCyI6b2+juR9G6eD6XCjM9R5n99UWn2t1RwkT
EAW3zj3yx8uqfaA446nH/7uOuOtBpMS1vsZ5W7DFM6eU/dKpxj4=
=zjSP
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

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

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