~ruther/guix-local

857ecb3df5850f50923ce7f7410f05f3fcc3e41f — Ludovic Courtès 12 years ago 87bf526
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.
1 files changed, 2 insertions(+), 1 deletions(-)

M guix/packages.scm
M guix/packages.scm => guix/packages.scm +2 -1
@@ 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.