import: cran: Only use the git import with what looks like a URL.
* guix/import/cran.scm (fetch-description): Abort if the argument does not look like a URL.
This commit is contained in:
parent
c7358ac4fc
commit
8786fec485
|
@ -230,16 +230,17 @@ from ~s: ~a (~s)~%"
|
||||||
(if (boolean? type) meta
|
(if (boolean? type) meta
|
||||||
(cons `(bioconductor-type . ,type) meta))))))))))
|
(cons `(bioconductor-type . ,type) meta))))))))))
|
||||||
((git)
|
((git)
|
||||||
;; Download the git repository at "NAME"
|
(and (string-prefix? "http" name)
|
||||||
(call-with-values
|
;; Download the git repository at "NAME"
|
||||||
(lambda () (download name #t))
|
(call-with-values
|
||||||
(lambda (dir commit)
|
(lambda () (download name #t))
|
||||||
(and=> (description->alist (with-input-from-file
|
(lambda (dir commit)
|
||||||
(string-append dir "/DESCRIPTION") read-string))
|
(and=> (description->alist (with-input-from-file
|
||||||
(lambda (meta)
|
(string-append dir "/DESCRIPTION") read-string))
|
||||||
(cons* `(git . ,name)
|
(lambda (meta)
|
||||||
`(git-commit . ,commit)
|
(cons* `(git . ,name)
|
||||||
meta))))))))
|
`(git-commit . ,commit)
|
||||||
|
meta)))))))))
|
||||||
|
|
||||||
(define (listify meta field)
|
(define (listify meta field)
|
||||||
"Look up FIELD in the alist META. If FIELD contains a comma-separated
|
"Look up FIELD in the alist META. If FIELD contains a comma-separated
|
||||||
|
|
Loading…
Reference in New Issue