summaryrefslogtreecommitdiff
path: root/rodion/packages/go.scm
blob: b0af61e2009f113b5044f743489c52f22b76d8d2 (about) (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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
(define-module (rodion packages go)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix utils)
  #:use-module (guix gexp)
  #:use-module (guix memoization)
  #:use-module ((guix build utils) #:select (alist-replace))
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system go)
  #:use-module (gnu packages)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages base)
  #:use-module ((gnu packages bootstrap) #:select (glibc-dynamic-linker))
  #:use-module (gnu packages check)
  #:use-module (gnu packages fonts)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gnupg)
  #:use-module (gnu packages golang-build)
  #:use-module (gnu packages golang-check)
  #:use-module (gnu packages golang-compression)
  #:use-module (gnu packages golang-crypto)
  #:use-module (gnu packages golang-web)
  #:use-module (gnu packages golang-xyz)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages mail)
  #:use-module (gnu packages mp3)
  #:use-module (gnu packages password-utils)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages ruby)
  #:use-module (gnu packages syncthing)
  #:use-module (gnu packages terminals)
  #:use-module (gnu packages textutils)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages web)
  #:use-module (gnu packages golang)
  #:use-module (gnu packages golang-web)
  #:use-module (gnu packages golang-xyz)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-1))

(define-public go-1.22
  (package
   (inherit go-1.21)
   (name "go")
   (version "1.22.1")
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/golang/go")
           (commit (string-append "go" version))))
     (file-name (git-file-name name version))
     (sha256
      (base32 "01zz8n5c32vympr2l9jdg5pzn63d3z28p0d4q6wmd0pr2jd3l3wn"))))
   (arguments
    (substitute-keyword-arguments (package-arguments go-1.21)
				  ((#:phases phases)
				   #~(modify-phases #$phases
						    (delete 'unpatch-perl-shebangs)))))
   (native-inputs
    ;; Go 1.22 requires Go 1.20 or later as the bootstrap toolchain.
    (alist-replace "go"
                   (list go-1.21)
                   (package-native-inputs go-1.21)))))

(define-public go-std-1.22 (make-go-std go-1.22))

(define-public go-github-com-x448-float16
  (package
    (name "go-github-com-x448-float16")
    (version "0.8.4")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/x448/float16")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0qg6ya30fra20hpa2qzqqzs8l95lvw9yzd87fdzq195xqi6crb2l"))))
    (build-system go-build-system)
    (arguments
     (list
      #:import-path "github.com/x448/float16"))
    (home-page "https://github.com/x448/float16")
    (synopsis "Float16 (Binary16) in Go/Golang")
    (description
     "@@code{float16} package provides
@@url{https://en.wikipedia.org/wiki/Half-precision_floating-point_format,IEEE
754 half-precision floating-point format (binary16)} with IEEE 754 default
rounding for conversions.  IEEE 754-2008 refers to this 16-bit floating-point
format as binary16.")
    (license license:expat)))

(define-public go-github-com-abadojack-whatlanggo
  (package
    (name "go-github-com-abadojack-whatlanggo")
    (version "1.0.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/abadojack/whatlanggo")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1pidd5dqvcnqjjka12h0clj3mmq0j3bpanf9153schsx85xz7mzx"))))
    (build-system go-build-system)
    (arguments
     (list
      #:import-path "github.com/abadojack/whatlanggo"))
    (home-page "https://github.com/abadojack/whatlanggo")
    (synopsis "Natural language detection for Go.")
    (description
     "Package whatlanggo detects natural languages and scripts ( writing systems ).
Languages are represented by a determined list of constants while scripts are
represented by *unicode.@code{RangeTable}.")
    (license license:expat)))


(define-public go-github-com-fxamacker-cbor-v2
  (package
    (name "go-github-com-fxamacker-cbor-v2")
    (version "2.6.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/fxamacker/cbor")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "092g48d0mb7mv09x4qb3s899haliar8m7cvv77s5cqc5rncj6hzh"))))
    (build-system go-build-system)
    (arguments
     (list
      #:import-path "github.com/fxamacker/cbor/v2"))
    (propagated-inputs (list go-github-com-x448-float16))
    (home-page "https://github.com/fxamacker/cbor")
    (synopsis "CBOR Codec in Go")
    (description
     "Package cbor is a modern CBOR codec
(@@url{https://rfc-editor.org/rfc/rfc8949.html,RFC 8949} &
@@url{https://rfc-editor.org/rfc/rfc7049.html,RFC 7049}) with CBOR tags, Go
struct tags (toarray/keyasint/omitempty), Core Deterministic Encoding, CTAP2,
Canonical CBOR, float64->32->16, and duplicate map key detection.")
    (license license:expat)))


(define-public go-github-com-google-go-tpm-legacy-tpm2
  (package
    (name "go-github-com-google-go-tpm-legacy-tpm2")
    (version "0.9.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/google/go-tpm")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1pv77fmlxrnxasj6fjvzrv9yaf2qb45x1zss3nbsdvzgpwviaiyi"))))
    (build-system go-build-system)
    (arguments
     (list
      #:unpack-path "github.com/google/go-tpm"
      #:import-path "github.com/google/go-tpm/legacy/tpm2"))
    (propagated-inputs (list go-golang-org-x-sys))
    (home-page "https://github.com/google/go-tpm")
    (synopsis "Go-TPM Legacy TPM 2.0 library")
    (description
     "Go-TPM is a Go library that communicates directly with a TPM device on Linux or
Windows machines.")
    (license license:asl2.0)))

(define-public go-github-com-google-go-tpm-tpmutil
  (package
    (name "go-github-com-google-go-tpm-tpmutil")
    (version "0.9.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/google/go-tpm")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1pv77fmlxrnxasj6fjvzrv9yaf2qb45x1zss3nbsdvzgpwviaiyi"))))
    (build-system go-build-system)
    (arguments
     (list
      #:unpack-path "github.com/google/go-tpm"
      #:import-path "github.com/google/go-tpm/tpmutil"))
    (propagated-inputs (list go-golang-org-x-sys))
    (home-page "https://github.com/google/go-tpm")
    (synopsis "Go-TPM TPM util")
    (description
     "Go-TPM is a Go library that communicates directly with a TPM device on Linux or
Windows machines.")
    (license license:asl2.0)))

(define-public go-github-com-go-webauthn-x
  (package
    (name "go-github-com-go-webauthn-x")
    (version "0.1.9")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/go-webauthn/x")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1lxxd2xhb5iappn4w49z5ahin4xfn3rj04vkdzzipyvwfzlix2al"))))
    (build-system go-build-system)
    (arguments
     (list
      #:unpack-path "github.com/go-webauthn/x"
      #:import-path "github.com/go-webauthn/x/revoke"))
    (propagated-inputs (list go-golang-org-x-crypto))
    (home-page "https://github.com/go-webauthn/x")
    (synopsis "Low level packages for Webauthn")
    (description "Low level packages for Go Webauthn library.")
    (license license:bsd-3)))

(define-public go-github-com-go-webauthn-webauthn-protocol
  (package
    (name "go-github-com-go-webauthn-webauthn-protocol")
    (version "0.10.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/go-webauthn/webauthn")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1jbx3cd8cr4aaqq9s1x4sd1rlcs3lmam5aavpl08s5rj18m7rivf"))))
    (build-system go-build-system)
    (arguments
     (list
      #:go go-1.18
      ;; Tests are using external network address
      #:tests? #f
      #:unpack-path "github.com/go-webauthn/webauthn"
      #:import-path "github.com/go-webauthn/webauthn/protocol"))
    (native-inputs (list go-github-com-stretchr-testify))
    (propagated-inputs (list go-golang-org-x-crypto
                             go-github-com-mitchellh-mapstructure
                             go-github-com-google-uuid
                             go-github-com-google-go-tpm-tpmutil
                             go-github-com-google-go-tpm-legacy-tpm2
                             go-github-com-golang-jwt-jwt-v5
                             go-github-com-go-webauthn-x
                             go-github-com-fxamacker-cbor-v2))
    (home-page "https://github.com/go-webauthn/webauthn")
    (synopsis "WebAuthn Library")
    (description
     "This library is meant to handle @@url{https://www.w3.org/TR/webauthn,Web
Authentication} for Go apps that wish to implement a passwordless solution for
users.  This library conforms as much as possible to the guidelines and
implementation procedures outlined by the document.")
    (license license:bsd-3)))

(define-public go-github-com-go-webauthn-webauthn-metadata
  (package
    (name "go-github-com-go-webauthn-webauthn-metadata")
    (version "0.10.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/go-webauthn/webauthn")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1jbx3cd8cr4aaqq9s1x4sd1rlcs3lmam5aavpl08s5rj18m7rivf"))))
    (build-system go-build-system)
    (arguments
     (list
      #:go go-1.18
      ;; Tests are using external network address
      #:tests? #f
      #:unpack-path "github.com/go-webauthn/webauthn"
      #:import-path "github.com/go-webauthn/webauthn/metadata"))
    (propagated-inputs (list go-golang-org-x-crypto
                             go-github-com-mitchellh-mapstructure
                             go-github-com-google-uuid
                             go-github-com-google-go-tpm-tpmutil
                             go-github-com-google-go-tpm-legacy-tpm2
                             go-github-com-golang-jwt-jwt-v5
                             go-github-com-go-webauthn-x
                             go-github-com-fxamacker-cbor-v2))
    (native-inputs (list go-github-com-stretchr-testify))
    (home-page "https://github.com/go-webauthn/webauthn")
    (synopsis "WebAuthn Library Metadata")
    (description "Metadata for Go WebAuthn library.")
    (license license:bsd-3)))

(define-public go-github-com-go-webauthn-webauthn-webauthn
  (package
    (name "go-github-com-go-webauthn-webauthn-webauthn")
    (version "0.10.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/go-webauthn/webauthn")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1jbx3cd8cr4aaqq9s1x4sd1rlcs3lmam5aavpl08s5rj18m7rivf"))))
    (build-system go-build-system)
    (arguments
     (list
      #:go go-1.18
      #:unpack-path "github.com/go-webauthn/webauthn"
      #:import-path "github.com/go-webauthn/webauthn/webauthn"))
    (propagated-inputs (list go-golang-org-x-crypto
                             go-github-com-mitchellh-mapstructure
                             go-github-com-google-uuid
                             go-github-com-google-go-tpm-tpmutil
                             go-github-com-google-go-tpm-legacy-tpm2
                             go-github-com-golang-jwt-jwt-v5
                             go-github-com-go-webauthn-x
                             go-github-com-fxamacker-cbor-v2))
    (native-inputs (list go-github-com-stretchr-testify))
    (home-page "https://github.com/go-webauthn/webauthn")
    (synopsis "WebAuthn Library")
    (description
     "This library is meant to handle @@url{https://www.w3.org/TR/webauthn,Web
Authentication} for Go apps that wish to implement a passwordless solution for
users.  This library conforms as much as possible to the guidelines and
implementation procedures outlined by the document.")
    (license license:bsd-3)))

(define-public miniflux
  (package
    (name "miniflux")
    (version "2.1.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/miniflux/v2")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0mi0bqnw3y9b2akil1rd52jq59nijsal0w2zp8ll6br0pr4sic82"))))
    (build-system go-build-system)
    (arguments
     (list
      #:go go-1.22
      #:install-source? #f
      #:import-path "miniflux.app/v2"
      #:build-flags #~(list (string-append
                             "-ldflags= -X miniflux.app/v2/internal/version.Version="
                             #$version))
      #:phases #~(modify-phases %standard-phases
                   (add-before 'build 'disable-cgo
                     (lambda _
                       (setenv "CGO_ENABLED" "0")))
                   (add-after 'install 'install-manpage
                     (lambda* (#:key import-path #:allow-other-keys)
                       (let ((man1 (string-append #$output "/share/man/man1/"))
                             (page (format #f "src/~a/miniflux.1" import-path)))
                         (install-file page man1))))
                   (add-after 'install-manpage 'rename-binary
                     (lambda _
                       (let ((bindir (string-append #$output "/bin/")))
                         (rename-file (string-append bindir "v2")
                                      (string-append bindir "miniflux"))))))))
    (inputs (list go-github-com-go-webauthn-webauthn-webauthn
                  go-github-com-go-webauthn-webauthn-protocol
                  go-github-com-go-webauthn-webauthn-metadata
                  go-github-com-abadojack-whatlanggo
                  go-github-com-coreos-go-oidc-v3
                  go-github-com-gorilla-mux
                  go-github-com-lib-pq
                  go-github-com-prometheus-client-golang
                  go-github-com-puerkitobio-goquery
                  go-github-com-rylans-getlang
                  go-github-com-tdewolff-minify-v2
                  go-github-com-yuin-goldmark
                  go-golang-org-x-term
                  go-mvdan-cc-xurls))
    (home-page "https://miniflux.app/")
    (synopsis "Minimalist and opinionated feed reader")
    (description "Miniflux is a minimalist and opinionated feed reader:

@itemize
@item Written in Go (Golang)
@item Works only with Postgresql
@item Doesn't use any ORM
@item Doesn't use any complicated framework
@item Use only modern vanilla Javascript (ES6 and Fetch API)
@item Single binary compiled statically without dependency
@item The number of features is voluntarily limited
@end itemize
")
    (license license:asl2.0)))