gnu: go-mvdan-cc-gofumpt: Swap inheritance with gofumpt.

This change would help to use the library package by other Guix
modules which is not easy when it's inherited from the command.

* gnu/packages/golang.scm (go-mvdan-cc-gofumpt) [arguments]
<skip-build?>: Now it's a library, keep binary in dedicated package.
(gofumpt): Inherit.
[arguments] <tests?>: Tested in library.
<install-source?>: It's final binary, no source required.
<skip-build?>: We need to build it now.
[propagated-inputs]: Move all to native-inputs as it's final binary.
[native-inputs]: Inherit from go-mvdan-cc-gofumpt.

Change-Id: I05329e6d2a6f22d93c4a5a1baa71f5cf078b469e
This commit is contained in:
Sharlatan Hellseher 2025-01-11 12:21:05 +00:00
parent 1128e5262b
commit 132c403ceb
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -2698,9 +2698,9 @@ sinks and sources.")
or capture raw audio.") or capture raw audio.")
(license license:expat)))) (license license:expat))))
(define-public gofumpt (define-public go-mvdan-cc-gofumpt
(package (package
(name "gofumpt") (name "go-mvdan-cc-gofumpt")
(version "0.7.0") (version "0.7.0")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
@ -2723,6 +2723,7 @@ or capture raw audio.")
#~(list (format #f "-ldflags=-X ~s" #~(list (format #f "-ldflags=-X ~s"
(string-append "main.version=" #$version " (GNU Guix)"))) (string-append "main.version=" #$version " (GNU Guix)")))
#:import-path "mvdan.cc/gofumpt" #:import-path "mvdan.cc/gofumpt"
#:skip-build? #t
#:test-flags #~(list "-skip" "TestScript/diagnose") #:test-flags #~(list "-skip" "TestScript/diagnose")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
@ -2753,18 +2754,18 @@ That is, @code{gofumpt} is happy with a subset of the formats that
@code{gofmt} is happy with.") @code{gofmt} is happy with.")
(license license:bsd-3))) (license license:bsd-3)))
(define-public go-mvdan-cc-gofumpt (define-public gofumpt
(package (package
(inherit gofumpt) (inherit go-mvdan-cc-gofumpt)
(name "go-mvdan-cc-gofumpt") (name "gofumpt")
(arguments (arguments
`(#:import-path "mvdan.cc/gofumpt" (substitute-keyword-arguments
#:tests? #f (package-arguments go-mvdan-cc-gofumpt)
#:install-source? #t ((#:tests? _ #t) #f)
#:phases (modify-phases %standard-phases ((#:install-source? _ #t) #f)
(delete 'build)))) ((#:skip-build? _ #t) #f)))
(propagated-inputs (package-inputs gofumpt)) (native-inputs (package-propagated-inputs go-mvdan-cc-gofumpt))
(native-inputs '()) (propagated-inputs '())
(inputs '()))) (inputs '())))
(define-public go-github-com-mtibben-percent (define-public go-github-com-mtibben-percent