diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-09-24 19:07:22 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-09-24 19:07:22 +0200 |
commit | 3f6f7b36d3bc919600cc35b5467c13634f9e4d53 (patch) | |
tree | 49a5e2139bfa616caa0bc82a00eb951a169db71b | |
parent | 8689901f95499e98e0209e75b4f268bf2af325c1 (diff) | |
download | patches-3f6f7b36d3bc919600cc35b5467c13634f9e4d53.tar patches-3f6f7b36d3bc919600cc35b5467c13634f9e4d53.tar.gz |
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.
-rw-r--r-- | guix/packages.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index b4fc026dbb..97a2464309 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -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)) |