* [bug#74992] guix import go package definition is not valid
@ 2024-12-20 10:32 MSavoritias via Guix-patches via
2024-12-20 23:57 ` Sharlatan Hellseher
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: MSavoritias via Guix-patches via @ 2024-12-20 10:32 UTC (permalink / raw)
To: 74992
Doing:
@localhost ~$ guix import go code.forgejo.org/f3/gof3/v3
guix import: Importing package "code.forgejo.org/f3/gof3/v3"...
guix import: varoitus: Unable to determine repository root of
'code.forgejo.org/f3/gof3'. Guessing 'code.forgejo.org/f3/gof3'.
(define-public go-code-forgejo-org-f3-gof3
(package
(name "go-code-forgejo-org-f3-gof3")
(version "3.10.1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://code.forgejo.org/f3/gof3.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1ysqlj5aa7bhsyghzhycngg45wclc1j2yhq1l27d5crb0pq0wfwg"))))
(build-system go-build-system)
(arguments
(list
#:go 1.22
#:import-path "code.forgejo.org/f3/gof3/v3"
#:unpack-path "code.forgejo.org/f3/gof3"))
(propagated-inputs (list go-golang-org-x-crypto
go-github-com-xanzy-go-gitlab
go-github-com-urfave-cli-v2
go-github-com-stretchr-testify
go-github-com-santhosh-tekuri-jsonschema-v6
go-github-com-hashicorp-go-version
go-github-com-google-go-cmp
go-github-com-davidmz-go-pageant
go-github-com-42wim-httpsig))
(home-page "https://code.forgejo.org/f3/gof3")
(synopsis "gof3")
(description
"As a CLI or as a library, @code{GoF3} provides a single
operation: mirroring.
The origin and destination are designated by the URL of a forge and a
path to
the resource. For instance, @@code{mirror --from-type forgejo --from
https://code.forgejo.org/forgejo/lxc-helpers --to-type F3 --to
/some/directory}
will mirror a project in a local directory using the F3 format.")
(license license:expat)))
This package definition is not valid.
#:go 1.22 should be written like #:go go-1.22
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting
struct): 1.22
MSavoritias
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#74992] guix import go package definition is not valid
2024-12-20 10:32 [bug#74992] guix import go package definition is not valid MSavoritias via Guix-patches via
@ 2024-12-20 23:57 ` Sharlatan Hellseher
2024-12-23 1:02 ` Sharlatan Hellseher
2024-12-23 2:48 ` [bug#74992] [PATCH] import/go: Fix #:go formation Sharlatan Hellseher
2 siblings, 0 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2024-12-20 23:57 UTC (permalink / raw)
To: 74992
[-- Attachment #1: Type: text/plain, Size: 506 bytes --]
Hi MSavoritias,
Thank you for reporting that!
It's known issue with importer which might need some after math manual
adjustment anyway (check license, check synopsis, check description,
check native/propagated inputs) which are not 100% accurate.
Summing all above adjust #go to correct one or remove it completely (the
current build go version is 1.21), should be not a big deal.
But, you may improve it! Take a look at the importer's code and maybe
implement the adjustment, WDYT?
--
Oleg,
go-team
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#74992] guix import go package definition is not valid
2024-12-20 10:32 [bug#74992] guix import go package definition is not valid MSavoritias via Guix-patches via
2024-12-20 23:57 ` Sharlatan Hellseher
@ 2024-12-23 1:02 ` Sharlatan Hellseher
2024-12-23 2:48 ` [bug#74992] [PATCH] import/go: Fix #:go formation Sharlatan Hellseher
2 siblings, 0 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2024-12-23 1:02 UTC (permalink / raw)
To: 74992
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
This is that part of importer which produces the guess:
,@(if (version>? min-go-version (package-version (go-package)))
`(#:go ,(string->number min-go-version))
'())
[-- Attachment #2: Type: text/html, Size: 426 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#74992] [PATCH] import/go: Fix #:go formation.
2024-12-20 10:32 [bug#74992] guix import go package definition is not valid MSavoritias via Guix-patches via
2024-12-20 23:57 ` Sharlatan Hellseher
2024-12-23 1:02 ` Sharlatan Hellseher
@ 2024-12-23 2:48 ` Sharlatan Hellseher
2 siblings, 0 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2024-12-23 2:48 UTC (permalink / raw)
To: 74992; +Cc: Sharlatan Hellseher, Katherine Cox-Buday, Sharlatan Hellseher
Reported by MSavoritias <email@msavoritias.me> in #74992 "guix import go
package definition is not valid". This change fixes it: instead of
"#:go 1.22" will produce "#:go go-1.22".
* guix/import/go.scm (go-module->guix-package): Fix format for #:go key
argument.
Change-Id: I9db0688b8e2970f5e90b415966d39b45505b7c8e
---
guix/import/go.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/guix/import/go.scm b/guix/import/go.scm
index 32cba25b33..915846bed1 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -704,7 +704,9 @@ (define* (go-module->guix-package module-path #:key
(build-system go-build-system)
(arguments
(list ,@(if (version>? min-go-version (package-version (go-package)))
- `(#:go ,(string->number min-go-version))
+ `(#:go ,(string->symbol
+ (format #f "go-~a"
+ (string->number min-go-version))))
'())
#:import-path ,module-path
,@(if (string=? module-path root-module-path)
base-commit: 30fdffc4b5605431b28a23b03330e850b2184a76
--
2.46.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-23 3:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 10:32 [bug#74992] guix import go package definition is not valid MSavoritias via Guix-patches via
2024-12-20 23:57 ` Sharlatan Hellseher
2024-12-23 1:02 ` Sharlatan Hellseher
2024-12-23 2:48 ` [bug#74992] [PATCH] import/go: Fix #:go formation Sharlatan Hellseher
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).