packages: Allow use of origins as patches. * guix/packages.scm (patch-and-repack)[patch-inputs]: Use 'add-to-store' only if the PATCH is a file name, and 'package-source-derivation' if PATCH is an origin.
1 files changed, 6 insertions(+), 2 deletions(-) M guix/packages.scm
M guix/packages.scm => guix/packages.scm +6 -2
@@ 345,8 345,12 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (define patch-inputs (map (lambda (number patch) (list (string-append "patch" (number->string number)) (add-to-store store (basename patch) #t "sha256" patch))) (match patch ((? string?) (add-to-store store (basename patch) #t "sha256" patch)) ((? origin?) (package-source-derivation store patch))))) (iota (length patches)) patches))