diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-08-30 14:59:31 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-08-30 18:38:08 +0200 |
commit | 8c578a609478f808e4350c0140ca0b15c5bed0f2 (patch) | |
tree | 4cd62152ea80fd9e748b238be217b79e4edc8af3 /guix/build/emacs-build-system.scm | |
parent | b7c7c03eb5e37fc3455e4e17b0898ffc4bca29c3 (diff) | |
download | guix-patches-8c578a609478f808e4350c0140ca0b15c5bed0f2.tar guix-patches-8c578a609478f808e4350c0140ca0b15c5bed0f2.tar.gz |
utils: Move 'package-name->name+version' to (guix build utils).
* guix/utils.scm (package-name->name+version): Move to...
* guix/build/utils.scm (package-name->name+version): ... here. New
procedure.
* guix/build/emacs-build-system.scm (package-name->name+version):
Remove.
Diffstat (limited to 'guix/build/emacs-build-system.scm')
-rw-r--r-- | guix/build/emacs-build-system.scm | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm index 1c48a1ab2e..aacb5a4186 100644 --- a/guix/build/emacs-build-system.scm +++ b/guix/build/emacs-build-system.scm @@ -150,28 +150,6 @@ second hyphen. This corresponds to 'name-version' as used in ELPA packages." strip-store-file-name) store-dir)) -;; from (guix utils). Should we put it in (guix build utils)? -(define (package-name->name+version name) - "Given NAME, a package name like \"foo-0.9.1b\", return two values: -\"foo\" and \"0.9.1b\". When the version part is unavailable, NAME and -#f are returned. The first hyphen followed by a digit is considered to -introduce the version part." - ;; See also `DrvName' in Nix. - - (define number? - (cut char-set-contains? char-set:digit <>)) - - (let loop ((chars (string->list name)) - (prefix '())) - (match chars - (() - (values name #f)) - ((#\- (? number? n) rest ...) - (values (list->string (reverse prefix)) - (list->string (cons n rest)))) - ((head tail ...) - (loop tail (cons head prefix)))))) - (define %standard-phases (modify-phases gnu:%standard-phases (delete 'configure) |