build-system/gnu: Simplify 'dist-package'.

* guix/build-system/gnu.scm (dist-package): Use default keyword
arguments in 'substitute-keyword-arguments'.
This commit is contained in:
Ludovic Courtès 2020-06-17 15:31:04 +02:00
parent dabbddbbaa
commit 7488d70c55
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -235,19 +235,15 @@ (define* (dist-package p source #:key (phases '%dist-phases))
(source s)
(arguments
;; Use the right phases and modules.
(let* ((args (default-keyword-arguments (package-arguments p)
`(#:phases #f
#:modules ,%default-modules
#:imported-modules ,%gnu-build-system-modules))))
(substitute-keyword-arguments args
((#:modules modules)
`((guix build gnu-dist)
,@modules))
((#:imported-modules modules)
`((guix build gnu-dist)
,@modules))
((#:phases _)
phases))))
(substitute-keyword-arguments (package-arguments p)
((#:modules modules %default-modules)
`((guix build gnu-dist)
,@modules))
((#:imported-modules modules %gnu-build-system-modules)
`((guix build gnu-dist)
,@modules))
((#:phases _ #f)
phases)))
(native-inputs
;; Add autotools & co. as inputs.
(let ((ref (lambda (module var)