download: url-fetch/tarball: Make ‘name’ truly optional.
* guix/download.scm (url-fetch/tarbomb): Fall back to ‘file-name’ if ‘name’ is #f, like the regular ‘url-fetch’ does. * gnu/packages/bioinformatics.scm (muscle)[source]: Remove ‘file-name’. * gnu/packages/engineering.scm (fastcap)[source]: Likewise. * gnu/packages/scheme.scm (scmutils)[source]: Likewise.
This commit is contained in:
parent
61ac754453
commit
58f91e4d03
@ -3501,7 +3501,6 @@ that a read originated from a particular isoform.")
|
|||||||
(version "3.8.1551")
|
(version "3.8.1551")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch/tarbomb)
|
(method url-fetch/tarbomb)
|
||||||
(file-name (string-append name "-" version))
|
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"http://www.drive5.com/muscle/muscle_src_"
|
"http://www.drive5.com/muscle/muscle_src_"
|
||||||
version ".tar.gz"))
|
version ".tar.gz"))
|
||||||
|
@ -259,7 +259,6 @@ featuring various improvements and bug fixes.")))
|
|||||||
(version "2.0-18Sep92")
|
(version "2.0-18Sep92")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch/tarbomb)
|
(method url-fetch/tarbomb)
|
||||||
(file-name (string-append name "-" version ".tar.gz"))
|
|
||||||
(uri (string-append "http://www.rle.mit.edu/cpg/codes/"
|
(uri (string-append "http://www.rle.mit.edu/cpg/codes/"
|
||||||
name "-" version ".tgz"))
|
name "-" version ".tgz"))
|
||||||
(sha256
|
(sha256
|
||||||
|
@ -604,7 +604,6 @@ threads.")
|
|||||||
(snippet
|
(snippet
|
||||||
;; Remove binary code
|
;; Remove binary code
|
||||||
'(delete-file-recursively "scmutils/mit-scheme"))
|
'(delete-file-recursively "scmutils/mit-scheme"))
|
||||||
(file-name (string-append name "-" version ".tar.gz"))
|
|
||||||
(uri (string-append "http://groups.csail.mit.edu/mac/users/gjs/6946"
|
(uri (string-append "http://groups.csail.mit.edu/mac/users/gjs/6946"
|
||||||
"/scmutils-tarballs/" name "-" version
|
"/scmutils-tarballs/" name "-" version
|
||||||
"-x86-64-gnu-linux.tar.gz"))
|
"-x86-64-gnu-linux.tar.gz"))
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
|
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
|
||||||
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
|
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
|
||||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||||
|
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
@ -485,17 +486,24 @@ in the store."
|
|||||||
(guile (default-guile)))
|
(guile (default-guile)))
|
||||||
"Similar to 'url-fetch' but unpack the file from URL in a directory of its
|
"Similar to 'url-fetch' but unpack the file from URL in a directory of its
|
||||||
own. This helper makes it easier to deal with \"tar bombs\"."
|
own. This helper makes it easier to deal with \"tar bombs\"."
|
||||||
|
(define file-name
|
||||||
|
(match url
|
||||||
|
((head _ ...)
|
||||||
|
(basename head))
|
||||||
|
(_
|
||||||
|
(basename url))))
|
||||||
(define gzip
|
(define gzip
|
||||||
(module-ref (resolve-interface '(gnu packages compression)) 'gzip))
|
(module-ref (resolve-interface '(gnu packages compression)) 'gzip))
|
||||||
(define tar
|
(define tar
|
||||||
(module-ref (resolve-interface '(gnu packages base)) 'tar))
|
(module-ref (resolve-interface '(gnu packages base)) 'tar))
|
||||||
|
|
||||||
(mlet %store-monad ((drv (url-fetch url hash-algo hash
|
(mlet %store-monad ((drv (url-fetch url hash-algo hash
|
||||||
(string-append "tarbomb-" name)
|
(string-append "tarbomb-"
|
||||||
|
(or name file-name))
|
||||||
#:system system
|
#:system system
|
||||||
#:guile guile)))
|
#:guile guile)))
|
||||||
;; Take the tar bomb, and simply unpack it as a directory.
|
;; Take the tar bomb, and simply unpack it as a directory.
|
||||||
(gexp->derivation name
|
(gexp->derivation (or name file-name)
|
||||||
#~(begin
|
#~(begin
|
||||||
(mkdir #$output)
|
(mkdir #$output)
|
||||||
(setenv "PATH" (string-append #$gzip "/bin"))
|
(setenv "PATH" (string-append #$gzip "/bin"))
|
||||||
|
Loading…
Reference in New Issue
Block a user