From 29a7c98a422bf3b9503ac8375db2ab28ef2dfe32 Mon Sep 17 00:00:00 2001 From: Ian Denhardt Date: Sat, 18 Oct 2014 22:03:42 -0400 Subject: gnu: Add 'version-prefix' and 'version-major+minor'; use them. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The procedure version-prefix truncates a version string to a certain number of components. version-major+minor is a special case of this, which extracts the "major.minor" part of the string. Previously this was handled by an expression common to several packages. * guix/utils.scm (version-prefix, version-major+minor): New procedures * gnu/packages/backup.scm (duplicity): Use version-major+minor. * gnu/packages/cmake.scm (cmake): Likewise. * gnu/packages/gnome.scm (libbonobo, libbonoboui): Likewise. * gnu/packages/gnutls.scm (gnutls): Likewise. * gnu/packages/mail.scm (gmime): Likewise. * gnu/packages/mpd.scm (mpd): Likewise. * gnu/packages/mpi.scm (openmpi): Likewise. Signed-off-by: Ludovic Courtès --- gnu/packages/mail.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gnu/packages/mail.scm') diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 2a742cdc56..46c24092e5 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014 Ludovic Courtès ;;; Copyright © 2014 Mark H Weaver +;;; Copyright © 2014 Ian Denhardt ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,9 +50,9 @@ #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+)) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) - #:use-module (guix build-system python) - #:use-module (srfi srfi-1)) + #:use-module (guix build-system python)) (define-public mailutils (package @@ -192,9 +193,7 @@ operating systems.") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/gmime/" - (string-join (take (string-split version #\.) - 2) - ".") + (version-major+minor version) "/gmime-" version ".tar.xz")) (sha256 (base32 -- cgit 1.4.1