build-system: go-vendored: Simplify arguments handling.

This commit is contained in:
Hilton Chain committed 2026-10-10 15:53:30 +08:00
1 parent 9525c5b1c0
commit 5119a0fbfd
1 file changed
+4 -20
+4 -20
View File
@@ -54,26 +54,10 @@
(sha256 vendor-hash)))))
'())
,@(bag-build-inputs go-bag)))
(build (bag-build go-bag))
(arguments
(strip-keyword-arguments private-keywords (bag-arguments go-bag)))
(build
(lambda args
(apply (bag-build go-bag)
(let loop ((positional '())
(keyword '())
(args args))
(match args
(((? keyword? key) (? (negate keyword?) val) rest ...)
(loop positional
(cons* key val keyword)
rest))
((arg rest ...)
(loop (cons arg positional)
keyword
rest))
(()
(append (reverse positional)
(substitute-keyword-arguments keyword
(substitute-keyword-arguments
(strip-keyword-arguments private-keywords (bag-arguments go-bag))
((#:imported-modules imported-modules '())
(if (null? imported-modules)
%default-go-vendored-imported-modules
@@ -81,7 +65,7 @@
((#:modules modules '())
(if (null? modules)
%default-go-vendored-modules
modules))))))))))))
modules))))))
(define go-vendored-build-system
(build-system