summaryrefslogtreecommitdiff
path: root/guix/scripts/build.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/build.scm')
-rw-r--r--guix/scripts/build.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 2307f76b42..7fd05da189 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -77,19 +77,26 @@ the new package's version number from URI."
;; Return the "base" of FILE-NAME, removing '.tar.gz' or similar
;; extensions.
;; TODO: Factorize.
- (cond ((numeric-extension? file-name)
+ (cond ((not (file-extension file-name))
+ file-name)
+ ((numeric-extension? file-name)
file-name)
((string=? (file-extension file-name) "tar")
(file-sans-extension file-name))
+ ((file-extension file-name)
+ (tarball-base-name (file-sans-extension file-name)))
(else
- (tarball-base-name (file-sans-extension file-name)))))
+ file-name)))
(let ((base (tarball-base-name (basename uri))))
(let-values (((name version)
(package-name->name+version base)))
(package (inherit p)
(version (or version (package-version p)))
- (source (download-to-store store uri))))))
+
+ ;; Use #:recursive? #t to allow for directories.
+ (source (download-to-store store uri
+ #:recursive? #t))))))
;;;