From a60fd377622f76e4a4d9f728624956c5d0d9e59d Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Fri, 12 Jul 2024 23:39:05 +0100 Subject: [PATCH] gnu: go-github-com-muesli-reflow-wordwrap: Consolidate other packages. Rename go-github-com-muesli-reflow-wordwrap to go-github-com-muesli-reflow which would contain all submodules to ease maintenance. * gnu/packages/golang.scm (go-github-com-muesli-reflow): Refresh package style. [arguments]: <#unpack-path>: Remove it. <#:import-path>: Adjust it to reflect the go.mod. <#:phases>: Use custom 'check phase. [description]: Place on a new line. * gnu/packages/golang.scm (go-github-com-muesli-reflow-ansi, go-github-com-muesli-reflow-indent, go-github-com-muesli-reflow-padding, go-github-com-muesli-reflow-truncate): Delete variables. * gnu/packages/configuration-management.scm (chezmoi): Adjust inputs. [native-inputs]: Remove go-github-com-muesli-reflow-ansi, go-github-com-muesli-reflow-indent, go-github-com-muesli-reflow-padding, and go-github-com-muesli-reflow. * gnu/packages/golang.scm (go-github-com-charmbracelet-glamour): Likewise. [native-inputs]: Remove go-github-com-muesli-reflow-ansi, go-github-com-muesli-reflow-wordwrap, go-github-com-muesli-reflow-indent, and go-github-com-muesli-reflow. * gnu/packages/golang.scm (go-github-com-charmbracelet-bubbletea): Likewise. [propagated-inputs]: Remove go-github-com-muesli-reflow-indent, go-github-com-muesli-reflow-ansi, and and go-github-com-muesli-reflow. Change-Id: I2e0f2abad36bd6a9ca98e2505fcd90273294213b --- gnu/packages/configuration-management.scm | 5 +- gnu/packages/golang.scm | 84 ++++++++--------------- 2 files changed, 30 insertions(+), 59 deletions(-) diff --git a/gnu/packages/configuration-management.scm b/gnu/packages/configuration-management.scm index 5a67de919f..cded9b0bb8 100644 --- a/gnu/packages/configuration-management.scm +++ b/gnu/packages/configuration-management.scm @@ -100,10 +100,7 @@ (define-public chezmoi go-github-com-mattn-go-isatty go-github-com-mattn-go-runewidth go-github-com-microcosm-cc-bluemonday - go-github-com-muesli-reflow-ansi - go-github-com-muesli-reflow-indent - go-github-com-muesli-reflow-padding - go-github-com-muesli-reflow-wordwrap + go-github-com-muesli-reflow go-github-com-muesli-termenv go-github-com-olekukonko-tablewriter go-github-com-pelletier-go-toml diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 622cc0f22f..2eee149ab6 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -6706,63 +6706,42 @@ (define-public go-github-com-bmatcuk-doublestar-v4 (list #:import-path "github.com/bmatcuk/doublestar/v4")))) -(define-public go-github-com-muesli-reflow-wordwrap +(define-public go-github-com-muesli-reflow (package - (name "go-github-com-muesli-reflow-wordwrap") + (name "go-github-com-muesli-reflow") (version "0.3.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/muesli/reflow") - (commit (string-append "v" version)))) - (file-name (git-file-name "go-github-com-muesli-reflow" version)) - (sha256 - (base32 - "09zcz2cqdwgj1ilya5pqwndryk6lansn87x63fcm8j1xn74vd2ry")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/muesli/reflow") + (commit (string-append "v" version)))) + (file-name (git-file-name "go-github-com-muesli-reflow" version)) + (sha256 + (base32 "09zcz2cqdwgj1ilya5pqwndryk6lansn87x63fcm8j1xn74vd2ry")))) (build-system go-build-system) (arguments - `(#:import-path "github.com/muesli/reflow/wordwrap" - #:unpack-path "github.com/muesli/reflow")) - (native-inputs + (list + #:import-path "github.com/muesli/reflow" + #:phases + #~(modify-phases %standard-phases + ;; XXX: Workaround for go-build-system's lack of Go modules + ;; support. + (delete 'build) + (replace 'check + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" import-path) + (invoke "go" "test" "-v" "./...")))))))) + (propagated-inputs (list go-github-com-mattn-go-runewidth)) (home-page "https://github.com/muesli/reflow/") (synopsis "Collection of methods helping to transform blocks of text") - (description "This package provides a collection of ANSI-aware methods and -io.Writers helping you to transform blocks of text.") + (description + "This package provides a collection of ANSI-aware methods and io.Writers +helping you to transform blocks of text.") (license license:expat))) -(define-public go-github-com-muesli-reflow-ansi - (package - (inherit go-github-com-muesli-reflow-wordwrap) - (name "go-github-com-muesli-reflow-ansi") - (arguments - `(#:import-path "github.com/muesli/reflow/ansi" - #:unpack-path "github.com/muesli/reflow")))) - -(define-public go-github-com-muesli-reflow-indent - (package - (inherit go-github-com-muesli-reflow-wordwrap) - (name "go-github-com-muesli-reflow-indent") - (arguments - `(#:import-path "github.com/muesli/reflow/indent" - #:unpack-path "github.com/muesli/reflow")))) - -(define-public go-github-com-muesli-reflow-padding - (package - (inherit go-github-com-muesli-reflow-wordwrap) - (name "go-github-com-muesli-reflow-padding") - (arguments - `(#:import-path "github.com/muesli/reflow/padding" - #:unpack-path "github.com/muesli/reflow")))) - -(define-public go-github-com-muesli-reflow-truncate - (package - (inherit go-github-com-muesli-reflow-wordwrap) - (name "go-github-com-muesli-reflow-truncate") - (arguments - `(#:import-path "github.com/muesli/reflow/truncate" - #:unpack-path "github.com/muesli/reflow")))) - (define-public go-github-com-muesli-termenv (package (name "go-github-com-muesli-termenv") @@ -6895,10 +6874,7 @@ (define-public go-github-com-charmbracelet-glamour go-github-com-chris-ramon-douceur go-github-com-aymerick-douceur go-github-com-gorilla-css - go-github-com-muesli-reflow-ansi - go-github-com-muesli-reflow-wordwrap - go-github-com-muesli-reflow-indent - go-github-com-muesli-reflow-padding + go-github-com-muesli-reflow go-github-com-mattn-go-runewidth go-github-com-muesli-termenv go-github-com-google-goterm @@ -8420,11 +8396,9 @@ (define-public go-github-com-charmbracelet-bubbletea `(("github.com/mattn/go-isatty" ,go-github-com-mattn-go-isatty) ("github.com/muesli/termenv" ,go-github-com-muesli-termenv) ("github.com/mattn/go-runewidth" ,go-github-com-mattn-go-runewidth) - ("go-github-com-muesli-reflow-indent" ,go-github-com-muesli-reflow-indent) - ("go-github-com-muesli-reflow-ansi" ,go-github-com-muesli-reflow-ansi) + ("go-github-com-muesli-reflow" ,go-github-com-muesli-reflow) ("go-github-com-lucasb-eyer-go-colorful" ,go-github-com-lucasb-eyer-go-colorful) ("github.com/containerd/console" ,go-github-com-containerd-console) - ("go-github-com-muesli-reflow-truncate" ,go-github-com-muesli-reflow-truncate) ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) ("go-golang-org-x-sys" ,go-golang-org-x-sys) ("go-golang-org-x-term" ,go-golang-org-x-term)