From a2a6f0dd82ac107fd441227dc2f0778497534a14 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Fri, 13 Sep 2024 11:08:46 +0100 Subject: gnu: go-github-com-tomnomnom-gron: Improve package style. * gnu/packages/golang.scm (go-github-com-tomnomnom-gron): Improve package style. Swap [inputs] to [native-inputs] as it's not a library. Rename variable to "gron" to replace the name. [arguments]: Use common go-build-system key parameters. [native-inputs]: Remove lables; remove go-github-com-mattn-go-isatty. Change-Id: Ic6c3290e121882610dff67fdb74459c28285d6b3 --- gnu/packages/golang.scm | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index a51cdf59ac..a9151e33be 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -3181,39 +3181,30 @@ editor.") optimized for performance yet simple to use.") (license license:expat)))) -(define-public go-github-com-tomnomnom-gron +(define-public gron (package (name "gron") (version "0.7.1") - (home-page "https://github.com/tomnomnom/gron") (source (origin (method git-fetch) (uri (git-reference - (url home-page) + (url "https://github.com/tomnomnom/gron") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1sj34b6yv0qigy3aq7qmwf8bqxp1a8qh9p10lzkpw58s1c0iyh36")))) (build-system go-build-system) (arguments - (let ((import-path "github.com/tomnomnom/gron")) - `(#:import-path ,import-path - #:phases - (modify-phases %standard-phases - (add-after 'check 'remove-non-source - (lambda _ - (for-each (lambda (dir) - (delete-file-recursively - (string-append "src/" ,import-path dir))) - '("/docs" "/script" "/testdata")) - #t)))))) - (inputs - `(("github.com/fatih/color" ,go-github-com-fatih-color) - ("github.com/mattn/go-colorable" ,go-github-com-mattn-go-colorable) - ("github.com/mattn/go-isatty" ,go-github-com-mattn-go-isatty) - ("github.com/nwidger/jsoncolor" ,go-github-com-nwidger-jsoncolor) - ("github.com/pkg/errors" ,go-github-com-pkg-errors))) + (list + #:install-source? #f + #:import-path "github.com/tomnomnom/gron")) + (native-inputs + (list go-github-com-fatih-color + go-github-com-mattn-go-colorable + go-github-com-nwidger-jsoncolor + go-github-com-pkg-errors)) + (home-page "https://github.com/tomnomnom/gron") (synopsis "Transform JSON to make it easier to grep") (description "This package transforms JSON into discrete assignments to make it easier -- cgit v1.2.3