aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/cmake.scm
diff options
context:
space:
mode:
authorIan Denhardt <ian@zenhack.net>2014-10-18 22:03:42 -0400
committerLudovic Courtès <ludo@gnu.org>2014-10-20 15:32:54 +0200
commit29a7c98a422bf3b9503ac8375db2ab28ef2dfe32 (patch)
tree7fd9219e875e44fb6328b6f84994279e3504d34a /gnu/packages/cmake.scm
parent38bf090e7c3952bb30707fe544987cccc85b8677 (diff)
downloadgnu-guix-29a7c98a422bf3b9503ac8375db2ab28ef2dfe32.tar
gnu-guix-29a7c98a422bf3b9503ac8375db2ab28ef2dfe32.tar.gz
gnu: Add 'version-prefix' and 'version-major+minor'; use them.
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 <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/cmake.scm')
-rw-r--r--gnu/packages/cmake.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 2c20c73c23..63805ef9fd 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,14 +23,14 @@
#:use-module ((guix licenses) #:select (bsd-3))
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages backup)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages file)
- #:use-module (gnu packages xml)
- #:use-module (srfi srfi-1))
+ #:use-module (gnu packages xml))
(define-public cmake
(package
@@ -39,8 +40,7 @@
(method url-fetch)
(uri (string-append
"http://www.cmake.org/files/v"
- (string-join (take (string-split version #\.) 2)
- ".")
+ (version-major+minor version)
"/cmake-" version ".tar.gz"))
(sha256
(base32 "11q21vyrr6c6smyjy81k2k07zmn96ggjia9im9cxwvj0n88bm1fq"))
@@ -91,8 +91,7 @@
"--mandir=share/man"
,(string-append
"--docdir=share/doc/cmake-"
- (string-join (take (string-split version #\.) 2)
- "."))))))
+ (version-major+minor version))))))
%standard-phases)))))
(inputs
`(("file" ,file)