Subject: Re: [bug#38060] [PATCH] gnu: CMake: Update to 3.15.5.

From: Ivan Vilata i Balaguer <[email-masked]>
Date: Tue, 12 Nov 2019 00:28:11 -0500

Marius Bakke (2019-11-11 00:00:10 +0100) wrote:

> Ivan: if you need the newer CMake on 'master', can you submit a patch
> that adds a separate 'cmake-3.15.5' variable?  Then you can use that in
> cmake-build-system with '#:cmake ,cmake-3.15.5'.

Sure, I'm attaching the patch which I tried and seemed to work (at least for
installing [email-masked]` explicitly and using it).

Is it ok like this or shall I send it to guix-patches?

Cheers,

-- 
Ivan Vilata i Balaguer -- https://elvil.net/
>From 2d4fc3d0121ef79cbd0f7f3492536f6475ad51e2 Mon Sep 17 00:00:00 2001
From: Ivan Vilata-i-Balaguer <[email-masked]>
Date: Mon, 11 Nov 2019 18:53:23 -0500
Subject: [PATCH] gnu: CMake: Add version 3.15.5.

Add CMake version 3.15.5 but do not replace the existing version to avoid
triggering the rebuild of all CMake-based packages.

See <https://issues.guix.gnu.org/issue/38060>.

* gnu/packages/cmake.scm (cmake-3.15.5): Add CMake 3.15.5.
---
 gnu/packages/cmake.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 64349be444..e2c244c1a7 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -219,6 +219,22 @@ and workspaces that can be used in the compiler environment of your choice.")
                (append (search-patches "cmake-curl-certificates.patch")
                        (origin-patches (package-source cmake))))))))
 
+(define-public cmake-3.15.5
+  ;; CMake 3.15.5 fixes some issues, but declare another version to
+  ;; avoid triggering the rebuild of all CMake-based packages.
+  ;; See <https://issues.guix.gnu.org/issue/38060>.
+  (package
+    (inherit cmake)
+    (version "3.15.5")
+    (source (origin
+              (inherit (package-source cmake))
+              (uri (string-append "https://www.cmake.org/files/v"
+                                  (version-major+minor version)
+                                  "/cmake-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1d5y8d92axcc6rfqlsxamayfs3fc1vdby91hn5mx1kn02ppprpgv"))))))
+
 (define-public emacs-cmake-mode
   (package
     (inherit cmake)
-- 
2.23.0