mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
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
1 changed files with 16 additions and 10 deletions
|
@ -109,9 +109,12 @@ (define-record-type* <origin>
|
|||
(patches origin-patches (default '())) ; list of file names
|
||||
(patch-flags origin-patch-flags ; list of strings
|
||||
(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
|
||||
(default #f))
|
||||
(patch-guile origin-patch-guile ; derivation or #f
|
||||
(patch-guile origin-patch-guile ; package or #f
|
||||
(default #f)))
|
||||
|
||||
(define-syntax base32
|
||||
|
@ -264,11 +267,10 @@ (define (%standard-patch-inputs)
|
|||
("lzip" ,(ref '(gnu packages compression) 'lzip))
|
||||
("patch" ,(ref '(gnu packages base) 'patch)))))
|
||||
|
||||
(define (default-guile store system)
|
||||
"Return a derivation of d the default Guile package for SYSTEM."
|
||||
(let* ((distro (resolve-interface '(gnu packages base)))
|
||||
(guile (module-ref distro 'guile-final)))
|
||||
(package-derivation store guile system)))
|
||||
(define (default-guile)
|
||||
"Return the default Guile package for SYSTEM."
|
||||
(let ((distro (resolve-interface '(gnu packages base))))
|
||||
(module-ref distro 'guile-final)))
|
||||
|
||||
(define* (patch-and-repack store source patches inputs
|
||||
#:key
|
||||
|
@ -363,13 +365,17 @@ (define* (package-source-derivation store source
|
|||
inputs guile-for-build)
|
||||
;; One or more patches.
|
||||
(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
|
||||
#:flags flags
|
||||
#:system system
|
||||
#:guile-for-build (or guile-for-build
|
||||
(%guile-for-build)
|
||||
(default-guile store system)))))
|
||||
#:guile-for-build guile)))
|
||||
((and (? string?) (? store-path?) file)
|
||||
file)
|
||||
((? string? file)
|
||||
|
|
Loading…
Reference in a new issue