aboutsummaryrefslogtreecommitdiffstats
path: root/oni/packages/go.scm
blob: 31f98c8080e42be60589f008f2cc539071a97ef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
(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)))