snix: When unable to determine the version number, leave the URI unchanged.

* guix/snix.scm (snix-derivation->guix-package)[pretty-uri]: When
  VERSION is #f, return URI.
This commit is contained in:
Ludovic Courtès 2013-01-14 23:45:54 +01:00
parent 0ec1af59e5
commit 5b00f53526
1 changed files with 6 additions and 4 deletions

View File

@ -388,10 +388,12 @@ location of DERIVATION."
(list 'quasiquote inputs)))))) (list 'quasiquote inputs))))))
(define (pretty-uri uri version) (define (pretty-uri uri version)
(match (factorize-uri uri version) (if version
((items ...) (match (factorize-uri uri version)
`(string-append ,@items)) ((items ...)
(x x))) `(string-append ,@items))
(x x))
uri))
(define (license-variable license) (define (license-variable license)
;; Return the name of the (guix licenses) variable for LICENSE. ;; Return the name of the (guix licenses) variable for LICENSE.