;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Pierre-Antoine Rouby ;;; Copyright © 2019 Leo Famulari ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2023 Benjamin ;;; Copyright © 2023 Katherine Cox-Buday ;;; Copyright © 2023 Sharlatan Hellseher ;;; Copyright © 2023 Thomas Ieong ;;; Copyright © 2024 Artyom V. Poptsov ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages golang-xyz) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system go) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages golang) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-check) #:use-module (gnu packages golang-compression) #:use-module (gnu packages golang-crypto)) ;;; Commentary: ;;; ;;; Nomad Golang modules (libraries) are welcome here. ;;; ;;; Please: Try to add new module packages in alphabetic order. ;;; ;;; Code: (define-public go-github-com-bitly-timer-metrics (package (name "go-github-com-bitly-timer-metrics") (version "1.0.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/bitly/timer_metrics") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "02fhx8hx8126m2cgxw9fm8q2401r7zfann8b5zy5yyark1sgkrb4")))) (build-system go-build-system) (arguments '(#:import-path "github.com/bitly/timer_metrics")) (home-page "https://github.com/bitly/timer_metrics") (synopsis "Capture timings and enable periodic metrics every @var{n} events") (description "This package provides an efficient way to capture timing information and periodically output metrics") (license license:expat))) (define-public go-github-com-blang-semver (let ((commit "60ec3488bfea7cca02b021d106d9911120d25fe9") (revision "0")) (package (name "go-github-com-blang-semver") (version (git-version "0.0.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/blang/semver") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "19pli07y5592g4dyjyj0jq5rn548vc3fz0qg3624vm1j5828p1c2")))) (build-system go-build-system) (arguments '(#:import-path "github.com/blang/semver")) (home-page "https://github.com/blang/semver") (synopsis "Semantic versioning library written in Go") (description "Semver is a library for Semantic versioning written in Go.") (license license:expat)))) (define-public go-github-com-bmizerany-perks-quantile (package (name "go-github-com-bmizerany-perks-quantile") (version "0.0.0-20230307044200-03f9df79da1e") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/bmizerany/perks") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "1f2a99v3618bz2mf61iwhdjm3xi1gam6v4apqgcrz71gj7ba9943")))) (build-system go-build-system) (arguments (list #:unpack-path "github.com/bmizerany/perks" #:import-path "github.com/bmizerany/perks/quantile")) (home-page "https://github.com/bmizerany/perks") (synopsis "Library for computing quantiles") (description "Perks contains the Go package @code{quantile} that computes approximate quantiles over an unbounded data stream within low memory and CPU bounds.") (license license:bsd-2))) (define-public go-github-com-burntsushi-toml (package (name "go-github-com-burntsushi-toml") (version "1.2.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/BurntSushi/toml") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1v9czq4hsyvdz7yx70y6sgq77wmrgfmn09r9cj4w85z38jqnamv7")))) (build-system go-build-system) (arguments '(#:import-path "github.com/BurntSushi/toml")) (home-page "https://github.com/BurntSushi/toml") (synopsis "Toml parser and encoder for Go") (description "This package is toml parser and encoder for Go. The interface is similar to Go's standard library @code{json} and @code{xml} package.") (license license:expat))) (define-public go-github-com-djherbis-atime (package (name "go-github-com-djherbis-atime") (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/djherbis/atime") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0xsz55zpihd9wyrj6qvm3miqzb6x3mnp5apzs0dx1byndhb8adpq")))) (build-system go-build-system) (arguments '(#:import-path "github.com/djherbis/atime")) (home-page "https://github.com/djherbis/atime") (synopsis "Access Times for files") (description "Package atime provides a platform-independent way to get atimes for files.") (license license:expat))) (define-public go-github-com-gabriel-vasile-mimetype (package (name "go-github-com-gabriel-vasile-mimetype") (version "1.4.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/gabriel-vasile/mimetype") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "11swnjczhrza0xi8q2wlk056nnbcghm44vqs52zfv6rwqvy6imhj")))) (build-system go-build-system) (arguments (list #:go go-1.20 #:import-path "github.com/gabriel-vasile/mimetype" #:phases #~(modify-phases %standard-phases (add-before 'check 'add-supported-mimes-md (lambda* (#:key import-path #:allow-other-keys) ;; This file needs to be available for writing during the ;; tests otherwise they will fail. (let ((file (format #f "src/~a/supported_mimes.md" import-path))) (invoke "touch" file) (chmod file #o644))))))) (propagated-inputs (list go-golang-org-x-net)) (home-page "https://github.com/gabriel-vasile/mimetype") (synopsis "Golang library for media type and file extension detection") (description "This package provides a Golang module that uses magic number signatures to detect the MIME type of a file. Main features: @itemize @item Fast and precise MIME type and file extension detection. @item Supports @url{https://github.com/gabriel-vasile/mimetype/blob/master/supported_mimes.md, many MIME types}. @item Allows to @url{https://pkg.go.dev/github.com/gabriel-vasile/mimetype#example-package-Extend, extend} with other file formats. @item Common file formats are prioritized. @item @url{https://pkg.go.dev/github.com/gabriel-vasile/mimetype#example-package-TextVsBinary, Differentiation between text and binary files}. @item Safe for concurrent usage. @end itemize") (license license:expat))) (define-public go-github-com-matryer-try (package (name "go-github-com-matryer-try") (version "1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/matryer/try") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "15f0m5ywihivnvwzcw0mh0sg27aky9rkywvxqszxka9q051qvsmy")))) (build-system go-build-system) (arguments (list #:import-path "github.com/matryer/try" #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-tests (lambda* (#:key import-path #:allow-other-keys) (substitute* (string-append "src/" import-path "/try_test.go") (("var value string") "") (("value, err = SomeFunction\\(\\)") "_, err = SomeFunction()"))))))) (native-inputs (list go-github-com-cheekybits-is)) (home-page "https://github.com/matryer/try") (synopsis "Simple idiomatic retry package for Go") (description "This package provides an idiomatic Go retry module.") (license license:expat))) (define-public go-github-com-mreiferson-go-options (package (name "go-github-com-mreiferson-go-options") (version "1.0.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mreiferson/go-options") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1pxs9ybrh196qy14ijn4zn51h2z28lj31y6vxrz2xxhgvpmfmxyl")))) (build-system go-build-system) (arguments '(#:import-path "github.com/mreiferson/go-options")) (home-page "https://github.com/mreiferson/go-options") (synopsis "Go package to structure and resolve options") (description "The @code{options} Go package resolves configuration values set via command line flags, config files, and default struct values.") (license license:expat))) (define-public go-github-com-mreiferson-go-svc ;; NSQ specific fork of github.com/judwhite/go-svc, as Guix go build system ;; does not support go.mod with `replace' statement. (let ((commit "7a96e00010f68d9436e3de53a70c53f209a0c244") (revision "0")) (package (name "go-github-com-mreiferson-go-svc") (version (git-version "1.2.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mreiferson/go-svc") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "1acgb0n3svhnraqj1fz5qc5n3b4vc5ffwyk9vfi6gcfkibm0hgmd")))) (build-system go-build-system) (arguments '(#:import-path "github.com/judwhite/go-svc")) (propagated-inputs (list go-golang-org-x-sys)) (home-page "https://github.com/mreiferson/go-svc") (synopsis "Go Windows Service wrapper for GNU/Linux") (description "Go Windows Service wrapper compatible with GNU/Linux. Windows tests @url{https://github.com/judwhite/go-svc/raw/master/svc/svc_windows_test.go,here}.") (license license:expat)))) (define-public go-github-com-nats-io-nats-go (package (name "go-github-com-nats-io-nats-go") (version "1.32.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/nats-io/nats.go") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "08b3n5mdpxvn9hipz0j001bp5r67i43cqji9x9dyzikypqdfg38k")))) (build-system go-build-system) (arguments (list #:go go-1.20 #:import-path "github.com/nats-io/nats.go")) (propagated-inputs (list go-golang-org-x-text go-github-com-nats-io-nuid go-github-com-nats-io-nkeys go-github-com-klauspost-compress)) (home-page "https://github.com/nats-io/nats.go") (synopsis "Go Client for NATS server") (description "This package provides a Go client for the NATS messaging system.") (license license:asl2.0))) (define-public go-github-com-nats-io-nuid (package (name "go-github-com-nats-io-nuid") (version "1.0.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/nats-io/nuid") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "11zbhg4kds5idsya04bwz4plj0mmiigypzppzih731ppbk2ms1zg")))) (build-system go-build-system) (arguments '(#:import-path "github.com/nats-io/nuid")) (home-page "https://github.com/nats-io/nuid") (synopsis "Go library implementing identifier generator for NATS ecosystem") (description "This package provides a unique identifier generator that is high performance, very fast, and tries to be entropy pool friendly.") (license license:asl2.0))) (define-public go-github-com-nsqio-go-diskqueue (package (name "go-github-com-nsqio-go-diskqueue") (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/nsqio/go-diskqueue") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1hp66hkmfn0nyf3c53a40f94ah11a9rj01r5zp3jph9p54j8rany")))) (build-system go-build-system) (arguments '(#:import-path "github.com/nsqio/go-diskqueue")) (home-page "https://github.com/nsqio/go-diskqueue") (synopsis "Go package providing a file system backed FIFO queue") (description "The @code{diskqueue} Go package provides a file system backed FIFO queue.") (license license:expat))) (define-public go-github-com-nsqio-go-nsq (package (name "go-github-com-nsqio-go-nsq") (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/nsqio/go-nsq") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1h9z3z225sdgg7fl3l7x11xn5ch6lm5flgmcj046cdp453qj2qhf")))) (build-system go-build-system) (arguments (list #:tests? #f ;tests require networking #:import-path "github.com/nsqio/go-nsq")) (propagated-inputs (list go-github-com-golang-snappy)) (home-page "https://github.com/nsqio/go-nsq") (synopsis "Consumer/producer library for NSQ") (description "The @code{nsq} Go module provides a high-level @code{Consumer} and @code{Producer} types as well as low-level functions to communicate over the NSQ protocol @url{https://nsq.io/}.") (license license:expat))) (define-public go-go-uber-org-automaxprocs (package (name "go-go-uber-org-automaxprocs") (version "1.5.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/uber-go/automaxprocs") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "03arxcfaj7k6iwfdk0liaynxf9rjfj9m5glsjp7ws01xjkgrdpbc")))) (build-system go-build-system) (arguments '(#:import-path "go.uber.org/automaxprocs")) (native-inputs (list go-github-com-stretchr-testify go-github-com-prashantv-gostub)) (home-page "https://github.com/uber-go/automaxprocs") (synopsis "CPU-count detection library for Go") (description "This package automatically set GOMAXPROCS to match Linux container CPU quota.") (license license:expat))) ;;; ;;; Avoid adding new packages to the end of this file. To reduce the chances ;;; of a merge conflict, place them above by existing packages with similar ;;; functionality or similar names. ;;;