gnu: Add hyperledger-iroha.
[jackhill/guix/guix.git] / gnu / packages / gdb.scm
index e9df33e..310bb6c 100644 (file)
@@ -1,7 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages pkg-config)
   #:use-module ((guix licenses) #:select (gpl3+))
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (srfi srfi-1))
 
-(define-public gdb
+(define-public gdb-8.3
   (package
     (name "gdb")
-    (version "8.2.1")
+    (version "8.3.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/gdb/gdb-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "00i27xqawjv282a07i73lp1l02n0a3ywzhykma75qg500wll6sha"))))
+               "1i2pjwaafrlz7wqm40b4znr77ai32rjsxkpl2az38yyarpbv8m8y"))))
+
+    ;; Hide this package so that end users get 'gdb/next' below.
+    (properties '((hidden? . #t)))
+
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; FIXME "make check" fails on single-processor systems.
@@ -105,3 +112,41 @@ to specify the runtime conditions, to define breakpoints, and to change how
 the program is running to try to fix bugs.  It can be used to debug programs
 written in C, C++, Ada, Objective-C, Pascal and more.")
     (license gpl3+)))
+
+;; This version of GDB is required by some of the Rust compilers, see
+;; <https://bugs.gnu.org/37810>.
+(define-public gdb-8.2
+  (package/inherit
+   gdb-8.3
+   (version "8.2.1")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://gnu/gdb/gdb-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "00i27xqawjv282a07i73lp1l02n0a3ywzhykma75qg500wll6sha"))))))
+
+;; The "next" version of GDB, to be merged with 'gdb' in the next rebuild cycle.
+(define-public gdb/next
+  (package/inherit
+   gdb-8.3
+   (version "9.1")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://gnu/gdb/gdb-" version ".tar.xz"))
+             (sha256
+              (base32
+               "0dqp1p7w836iwijg1zb4a784n0j4pyjiw5v6h8fg5lpx6b40x7k9"))))
+   (arguments
+    `(#:out-of-source? #t
+      ,@(package-arguments gdb-8.3)))
+   (inputs
+    `(("source-highlight" ,source-highlight)
+      ,@(package-inputs gdb-8.3)))
+   (properties (alist-delete 'hidden? (package-properties gdb-8.3)))))
+
+(define-public gdb
+  ;; This is the fixed version that packages depend on.  Update it rarely
+  ;; enough to avoid massive rebuilds.
+  gdb-8.3)