From 94d6f4c51c027db04027fcd1e63a5ab9103a8184 Mon Sep 17 00:00:00 2001 From: Rodion Goritskov Date: Tue, 9 Apr 2024 19:39:15 +0400 Subject: gnu: Add fresh miniflux and dependencies. * rodion/packages/go.scm (miniflux): New variable. --- rodion/packages/go.scm | 343 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 343 insertions(+) (limited to 'rodion/packages') diff --git a/rodion/packages/go.scm b/rodion/packages/go.scm index f57edff..1ec6f59 100644 --- a/rodion/packages/go.scm +++ b/rodion/packages/go.scm @@ -40,6 +40,8 @@ #: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)) @@ -69,3 +71,344 @@ (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.1") + (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 "1aspvgk4b2xzv7qbhmlslvpyf9vcxr3860glw5hgwfkskcfqwx5x")))) + (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 'unpack 'fix-import + (lambda* (#:key import-path #:allow-other-keys) + (substitute* (string-append "src/" import-path + "/internal/integration/rssbridge/rssbridge.go") + (("^(.*import.*)(integration)(.*)$" _ start _ end) + (string-append start "v2/internal/integration" end))))) + (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))) -- cgit v1.2.3