182 lines
6.6 KiB
Scheme
182 lines
6.6 KiB
Scheme
(define-module (oni packages go)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix utils)
|
|
#:use-module (guix git-download)
|
|
#:use-module (guix build-system go)
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
#:use-module (gnu packages golang)
|
|
#:use-module (gnu packages cmake))
|
|
|
|
(define-public go-github-com-creack-pty
|
|
(package
|
|
(name "go-github-com-creack-pty")
|
|
(version "1.1.13")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/creack/pty")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"09glkl7f86njv78l849rpi80pw1ji5n1zbh48rd9ysl9rfzy34zq"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/creack/pty"))
|
|
(home-page "https://github.com/creack/pty")
|
|
(synopsis "pty")
|
|
(description
|
|
"Package pty provides functions for working with Unix terminals.")
|
|
(license license:expat)))
|
|
|
|
(define-public go-golang-org-x-term
|
|
(package
|
|
(name "go-golang-org-x-term")
|
|
(version "0.0.0-20210615171337-6886f2dfbf5b")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://go.googlesource.com/term")
|
|
(commit (go-version->git-ref version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"0661w7dp2ak1k4ii90v6chw2x8a6g4sc5j0ba58qlplaj4k5l0xs"))))
|
|
(build-system go-build-system)
|
|
(arguments '(#:import-path "golang.org/x/term"))
|
|
(propagated-inputs
|
|
`(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
|
|
(home-page "https://golang.org/x/term")
|
|
(synopsis "Go terminal/console support")
|
|
(description
|
|
"Package term provides support functions for dealing with terminals, as
|
|
commonly found on UNIX systems.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public go-mvdan-cc-editorconfig
|
|
(package
|
|
(name "go-mvdan-cc-editorconfig")
|
|
(version "0.2.0")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/mvdan/editorconfig")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"1rav1rp8pi921gsffqr2wjdhbr12w81g31yv6iw4yb1zyh726qqg"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "mvdan.cc/editorconfig"))
|
|
(native-inputs
|
|
`(("cmake" ,cmake)))
|
|
(home-page "https://mvdan.cc/editorconfig")
|
|
(synopsis "editorconfig")
|
|
(description
|
|
"Package editorconfig allows parsing and using EditorConfig files, as defined
|
|
in @url{https://editorconfig.org/,https://editorconfig.org/}.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public go-github-com-google-renameio-v1
|
|
(package
|
|
(name "go-github-com-google-renameio")
|
|
(version "1.0.1")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/google/renameio")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"1qn84nra9nxqyqg4i496b6ijbhnxvx66hdndwl7qh7r6q8lz2ba5"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/google/renameio"))
|
|
(home-page "https://github.com/google/renameio")
|
|
(synopsis "Atomicity vs durability")
|
|
(description
|
|
"Package renameio provides a way to atomically create or replace a file or
|
|
symbolic link.")
|
|
(license license:asl2.0)))
|
|
|
|
(define-public go-github-com-pkg-diff
|
|
(package
|
|
(name "go-github-com-pkg-diff")
|
|
(version "0.0.0-20210226163009-20ebb0f2a09e")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/pkg/diff")
|
|
(commit (go-version->git-ref version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"1g3dzgwhz4fx3ddpsv7fsa4r1v5clsp2lbw2qrkdk9y1vc5gi8yi"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
'(#:import-path "github.com/pkg/diff"))
|
|
(home-page "https://github.com/pkg/diff")
|
|
(synopsis "diff")
|
|
(description
|
|
"Package diff contains high level routines that generate a textual diff.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public shfmt
|
|
(package
|
|
(name "shfmt")
|
|
(version "3.3.0")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/mvdan/sh")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"1d3bn9l7k1df9prsz9zwakxi2q5750vdhrz8r91d1r3hn28nfgd4"))))
|
|
(build-system go-build-system)
|
|
(arguments
|
|
`(#:import-path "mvdan.cc/sh/v3"
|
|
#:phases
|
|
(modify-phases %standard-phases
|
|
(replace 'build
|
|
(lambda _
|
|
(with-directory-excursion "src/mvdan.cc/sh/v3/cmd/shfmt"
|
|
(invoke "go" "build" "-ldflags" "-linkmode=external"))))
|
|
(replace 'install
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
(let ((out (assoc-ref outputs "out")))
|
|
(with-directory-excursion "src/mvdan.cc/sh/v3/cmd/shfmt"
|
|
(install-file "shfmt" (string-append out "/bin"))))))
|
|
;; (replace 'check
|
|
;; (lambda _
|
|
;; (with-directory-excursion "src/mvdan.cc/sh/v3"
|
|
;; (invoke "go" "test" "./..."))))
|
|
)
|
|
#:tests? #f
|
|
#:install-source? #f))
|
|
(propagated-inputs
|
|
`(("go-mvdan-cc-editorconfig" ,go-mvdan-cc-editorconfig)
|
|
("go-golang-org-x-term" ,go-golang-org-x-term)
|
|
("go-golang-org-x-sys" ,go-golang-org-x-sys)
|
|
("go-golang-org-x-sync" ,go-golang-org-x-sync)
|
|
("go-github-com-rogpeppe-go-internal" ,go-github-com-rogpeppe-go-internal)
|
|
("go-github-com-pkg-diff" ,go-github-com-pkg-diff)
|
|
("go-github-com-kr-text" ,go-github-com-kr-text)
|
|
("go-github-com-kr-pretty" ,go-github-com-kr-pretty)
|
|
("go-github-com-google-renameio" ,go-github-com-google-renameio-v1)
|
|
("go-github-com-creack-pty" ,go-github-com-creack-pty)))
|
|
(home-page "https://mvdan.cc/sh/v3")
|
|
(synopsis "sh")
|
|
(description
|
|
"This package provides a shell parser, formatter, and interpreter. Supports @url{https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html,POSIX Shell}, @url{https://www.gnu.org/software/bash/,Bash}, and
|
|
@url{http://www.mirbsd.org/mksh.htm,mksh}. Requires Go 1.15 or later.")
|
|
(license license:bsd-3)))
|