diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-01-11 12:21:05 +0000 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-01-21 23:47:56 +0000 |
commit | 132c403ceb159cfe1f79406652fa7d6d7b165b98 (patch) | |
tree | b7d75dbc2fc4ef387cf8cfdde2be571619a44ead /gnu/packages/golang.scm | |
parent | 1128e5262b8d33cd8b59cc2482f8995252a3401c (diff) |
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
Diffstat (limited to 'gnu/packages/golang.scm')
-rw-r--r-- | gnu/packages/golang.scm | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 013e6cf3b1..a082a56473 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -2698,9 +2698,9 @@ sinks and sources.") or capture raw audio.") (license license:expat)))) -(define-public gofumpt +(define-public go-mvdan-cc-gofumpt (package - (name "gofumpt") + (name "go-mvdan-cc-gofumpt") (version "0.7.0") (source (origin (method git-fetch) @@ -2723,6 +2723,7 @@ or capture raw audio.") #~(list (format #f "-ldflags=-X ~s" (string-append "main.version=" #$version " (GNU Guix)"))) #:import-path "mvdan.cc/gofumpt" + #:skip-build? #t #:test-flags #~(list "-skip" "TestScript/diagnose") #: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.") (license license:bsd-3))) -(define-public go-mvdan-cc-gofumpt +(define-public gofumpt (package - (inherit gofumpt) - (name "go-mvdan-cc-gofumpt") + (inherit go-mvdan-cc-gofumpt) + (name "gofumpt") (arguments - `(#:import-path "mvdan.cc/gofumpt" - #:tests? #f - #:install-source? #t - #:phases (modify-phases %standard-phases - (delete 'build)))) - (propagated-inputs (package-inputs gofumpt)) - (native-inputs '()) + (substitute-keyword-arguments + (package-arguments go-mvdan-cc-gofumpt) + ((#:tests? _ #t) #f) + ((#:install-source? _ #t) #f) + ((#:skip-build? _ #t) #f))) + (native-inputs (package-propagated-inputs go-mvdan-cc-gofumpt)) + (propagated-inputs '()) (inputs '()))) (define-public go-github-com-mtibben-percent |