packages: Correctly handle patching for inputs with no extension.

Reported by Manolis Ragkousis <manolis837@gmail.com>.

* guix/packages.scm (patch-and-repack)[numeric-extension?]: Handle
  FILE-NAME with no extension.
This commit is contained in:
Ludovic Courtès 2014-04-12 14:39:43 +02:00
parent 87bf526b96
commit 857ecb3df5
1 changed files with 2 additions and 1 deletions

View File

@ -317,7 +317,8 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
(define (numeric-extension? file-name)
;; Return true if FILE-NAME ends with digits.
(string-every char-set:hex-digit (file-extension file-name)))
(and=> (file-extension file-name)
(cut string-every char-set:hex-digit <>)))
(define (tarxz-name file-name)
;; Return a '.tar.xz' file name based on FILE-NAME.