From 861cc37a4246783fa932e582cf5d28dded447250 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Thu, 12 Dec 2024 20:21:02 +0000 Subject: [PATCH] gnu: Add go-gopkg-in-inconshreveable-log15. * gnu/packages/golang-xyz.scm (go-gopkg-in-inconshreveable-log15-v1, go-gopkg-in-inconshreveable-log15-v2, go-gopkg-in-inconshreveable-log15-v3): New variables. Change-Id: If6dbda1806281c278230eb8c30c9d5fc198de01a --- gnu/packages/golang-xyz.scm | 81 +++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 03de87d749942a923ab534d0fd8c23d752955210..8044e1b7226af770e4b0438093ac2adb09b75c7d 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -9267,6 +9267,87 @@ Go.") (list #:import-path "gopkg.in/alecthomas/kingpin.v2")))) +(define-public go-gopkg-in-inconshreveable-log15-v1 + (package + (name "go-gopkg-in-inconshreveable-log15-v1") + (version "1.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/inconshreveable/log15") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1hz7vnzn4cbiqra443mhmp63ifzq15xsfnyc9jmxh2p1ngwxp2n2")))) + (build-system go-build-system) + (arguments + (list + #:import-path "gopkg.in/inconshreveable/log15.v1")) + (native-inputs + (list go-github-com-stretchr-testify)) + (home-page "https://pkg.go.dev/github.com/inconshreveable/log15") + (synopsis "Structured, composable logging for Golang") + (description + "This package provides a toolkit for logging that is both human and +machine readable. It is modeled after the Go standard library's @code{io} and +@code{net/http} packages and is an alternative to the standard library's +@code{log} package.") + (license license:asl2.0))) + +(define-public go-gopkg-in-inconshreveable-log15-v2 + (package + (inherit go-gopkg-in-inconshreveable-log15-v1) + (name "go-gopkg-in-inconshreveable-log15-v2") + (version "2.16.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/inconshreveable/log15") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "117ivm1asxw2hlwb3zf72q553ywjk00bsn21bpwi99q784ghr4wd")))) + (arguments + (list + #:import-path "gopkg.in/inconshreveable/log15.v2" + #:test-flags #~(list "-skip" "TestCallerStackHandler") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-import-path + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (substitute* (find-files "." "\\.go$") + (("github.com/inconshreveable/log15") import-path)))))))) + (propagated-inputs + (list go-github-com-go-stack-stack + go-github-com-mattn-go-colorable + go-golang-org-x-term)))) + +(define-public go-gopkg-in-inconshreveable-log15-v3 + (package + (inherit go-gopkg-in-inconshreveable-log15-v2) + (name "go-gopkg-in-inconshreveable-log15-v3") + (version "3.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/inconshreveable/log15") + (commit (string-append "v" version "-testing.5")))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14b03w7mlsac0n5ig5qc0iggii6ig9mvbiv6656r1h19vh4kmx8x")))) + (arguments + (substitute-keyword-arguments + (package-arguments go-gopkg-in-inconshreveable-log15-v2) + ((#:import-path _) "gopkg.in/inconshreveable/log15.v3"))) + (propagated-inputs + (list go-github-com-go-stack-stack + go-github-com-mattn-go-colorable + go-golang-org-x-term)))) + (define-public go-gopkg-in-ini-v1 (package (name "go-gopkg-in-ini-v1")