gnu: Add miller.

* gnu/packages/textutils.scm (miller): New variable.

Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Change-Id: Ic381b5e28e561382c49f843aa1baadf2d2d6f294
This commit is contained in:
Wilko Meyer 2023-10-18 11:38:20 +02:00 committed by Sharlatan Hellseher
parent d43b4d7758
commit e8d3d5224e
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -69,6 +69,7 @@ (define-module (gnu packages textutils)
#: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)
#:use-module (gnu packages golang-xyz)
#:use-module (gnu packages java)
@ -1535,6 +1536,60 @@ (define-public csvdiff
(define-public go-github-com-aswinkarthik-csvdiff
(deprecated-package "go-github-com-aswinkarthik-csvdiff" csvdiff))
(define-public miller
(package
(name "miller")
(version "6.12.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/johnkerl/miller")
(commit (go-version->git-ref version))))
(file-name (git-file-name name version))
(sha256
(base32 "195lgayq5z7ndag3w495fs618pkrhz426kg0kp3s5sa68vr1madp"))))
(build-system go-build-system)
(arguments
(list
#:go go-1.19
#:install-source? #f
#:import-path "github.com/johnkerl/miller/cmd/mlr"
#:unpack-path "github.com/johnkerl/miller"
#:phases
#~(modify-phases %standard-phases
;; TODO: Build all provided documentation.
(add-after 'install 'install-man-pages
(lambda* (#:key unpack-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" unpack-path)
(invoke "make" (string-append "PREFIX=" #$output)
"-C" "man" "install")))))))
(native-inputs
(list go-github-com-facette-natsort
go-github-com-johnkerl-lumin
go-github-com-kballard-go-shellquote
go-github-com-klauspost-compress
go-github-com-lestrrat-go-strftime
go-github-com-mattn-go-isatty
;; Optional, not packed in Guix
;; go-github-com-nine-lives-later-go-windows-terminal-sequences
go-github-com-pkg-profile
go-github-com-stretchr-testify
go-golang-org-x-sys
go-golang-org-x-term
go-golang-org-x-text
python-wrapper
python-mkdocs-material
ruby))
(home-page "https://miller.readthedocs.io/")
(synopsis "Text-formatted data processing tool")
(description
"Miller (@command{mlr}) is like @command{awk}, @command{sed},
@command{cut}, @command{join}, and @command{sort} for data formats such as
CSV, TSV, JSON, JSON Lines, and positionally-indexed. It supports format
conversion and pretty-printing.")
(license license:bsd-2)))
(define-public ack
(package
(name "ack")