(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-github-com-andybalholm-brotli-new (package (name "go-github-com-andybalholm-brotli-new") (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/andybalholm/brotli") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1zdvcwfzxnkljyh4p7izy0bfxrwidwwmp1p5h1fydyrgbs4xacly")))) (build-system go-build-system) (arguments `(#:import-path "github.com/andybalholm/brotli")) (home-page "https://github.com/andybalholm/brotli") (synopsis "Pure Go Brotli encoder and decoder") (description "This package is a brotli compressor and decompressor implemented in Go. It was translated from the reference implementation (@url{https://github.com/google/brotli,https://github.com/google/brotli}) with the @code{c2go} tool at @url{https://github.com/andybalholm/c2go,https://github.com/andybalholm/c2go}.") (license license:expat))) (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.3") (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 "0cb0fkjzbjrhgmx1s8jv1drdgfaddkyj9j9z451qswgvz6xyp3a3")))) (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 ;; Scans for all tests recursively (replace 'check (lambda* (#:key import-path #:allow-other-keys) (invoke "go" "test" (string-append import-path "/...")))) (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-andybalholm-brotli-new 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)))