packages: The 'patch-guile' field of <origin> is now a package.
* guix/packages.scm (default-guile): Return a package instead of a derivation. (package-source-derivation): Adjust accordingly.
This commit is contained in:
parent
cdecf77501
commit
1d9bc45925
|
@ -109,9 +109,12 @@
|
||||||
(patches origin-patches (default '())) ; list of file names
|
(patches origin-patches (default '())) ; list of file names
|
||||||
(patch-flags origin-patch-flags ; list of strings
|
(patch-flags origin-patch-flags ; list of strings
|
||||||
(default '("-p1")))
|
(default '("-p1")))
|
||||||
|
|
||||||
|
;; Patching requires Guile, GNU Patch, and a few more. These two fields are
|
||||||
|
;; used to specify these dependencies when needed.
|
||||||
(patch-inputs origin-patch-inputs ; input list or #f
|
(patch-inputs origin-patch-inputs ; input list or #f
|
||||||
(default #f))
|
(default #f))
|
||||||
(patch-guile origin-patch-guile ; derivation or #f
|
(patch-guile origin-patch-guile ; package or #f
|
||||||
(default #f)))
|
(default #f)))
|
||||||
|
|
||||||
(define-syntax base32
|
(define-syntax base32
|
||||||
|
@ -264,11 +267,10 @@ corresponds to the arguments expected by `set-path-environment-variable'."
|
||||||
("lzip" ,(ref '(gnu packages compression) 'lzip))
|
("lzip" ,(ref '(gnu packages compression) 'lzip))
|
||||||
("patch" ,(ref '(gnu packages base) 'patch)))))
|
("patch" ,(ref '(gnu packages base) 'patch)))))
|
||||||
|
|
||||||
(define (default-guile store system)
|
(define (default-guile)
|
||||||
"Return a derivation of d the default Guile package for SYSTEM."
|
"Return the default Guile package for SYSTEM."
|
||||||
(let* ((distro (resolve-interface '(gnu packages base)))
|
(let ((distro (resolve-interface '(gnu packages base))))
|
||||||
(guile (module-ref distro 'guile-final)))
|
(module-ref distro 'guile-final)))
|
||||||
(package-derivation store guile system)))
|
|
||||||
|
|
||||||
(define* (patch-and-repack store source patches inputs
|
(define* (patch-and-repack store source patches inputs
|
||||||
#:key
|
#:key
|
||||||
|
@ -363,13 +365,17 @@ using the tools listed in INPUTS."
|
||||||
inputs guile-for-build)
|
inputs guile-for-build)
|
||||||
;; One or more patches.
|
;; One or more patches.
|
||||||
(let ((source (method store uri 'sha256 sha256 name
|
(let ((source (method store uri 'sha256 sha256 name
|
||||||
#:system system)))
|
#:system system))
|
||||||
|
(guile (match (or guile-for-build (%guile-for-build)
|
||||||
|
(default-guile))
|
||||||
|
((? package? p)
|
||||||
|
(package-derivation store p system))
|
||||||
|
((? derivation? drv)
|
||||||
|
drv))))
|
||||||
(patch-and-repack store source patches inputs
|
(patch-and-repack store source patches inputs
|
||||||
#:flags flags
|
#:flags flags
|
||||||
#:system system
|
#:system system
|
||||||
#:guile-for-build (or guile-for-build
|
#:guile-for-build guile)))
|
||||||
(%guile-for-build)
|
|
||||||
(default-guile store system)))))
|
|
||||||
((and (? string?) (? store-path?) file)
|
((and (? string?) (? store-path?) file)
|
||||||
file)
|
file)
|
||||||
((? string? file)
|
((? string? file)
|
||||||
|
|
Loading…
Reference in New Issue