summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-04-16 22:09:41 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-04-16 23:41:52 +0200
commit3c0422b9be649e0a09caa0b893713a9f07855cd3 (patch)
tree6caa9c7813c81c47011feee743c26f4ee856f00d
parent3fd4c4c8394bca7aa9dd81c0ad81f2bb31989464 (diff)
import/print: Don't factorize URI if there's no version match.
* guix/import/print.scm (package->code): If FACTORIZE-URI returns just the unmodified string use that as the URI.
-rw-r--r--guix/import/print.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/import/print.scm b/guix/import/print.scm
index 471687c0ff..11cc218285 100644
--- a/guix/import/print.scm
+++ b/guix/import/print.scm
@@ -79,7 +79,9 @@ when evaluated."
(patches (origin-patches source)))
`(origin
(method ,(procedure-name method))
- (uri (string-append ,@(factorize-uri uri version)))
+ (uri (string-append ,@(match (factorize-uri uri version)
+ ((? string? uri) (list uri))
+ (factorized factorized))))
(sha256
(base32
,(format #f "~a" (bytevector->nix-base32-string sha256))))