GNU bug report logs - #54052
[PATCH] gnu: cgdb: Add gdb to propagated-inputs

Previous Next

Package: guix-patches;

Reported by: Chadwain Holness <chadwainholness <at> gmail.com>

Date: Fri, 18 Feb 2022 05:20:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 54052 <at> debbugs.gnu.org (full text, mbox):

From: Chadwain Holness <chadwainholness <at> gmail.com>
To: 54052 <at> debbugs.gnu.org,
	maximedevos <at> telenet.be
Cc: Chadwain Holness <chadwainholness <at> gmail.com>
Subject: Re: [bug#54052] [PATCH] gnu: cgdb: Add gdb to propagated-inputs
Date: Sun, 20 Feb 2022 03:11:56 -0500
Hello Maxime, thank you for the suggestion. Is this new patch better in your opinion?

* gnu/packages/debug.scm (cgdb)[inputs]: Add gdb
[arguments]: Add phase to fix hardcoded gdb and sh paths
---
 gnu/packages/debug.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 24d17d95b0..85003feeae 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -760,9 +760,19 @@ (define-public cgdb
         (base32 "1w8ib2vg3pg68d9hh97fw5042c73i9nqavdddc87n9bpscjbaf0d"))))
     (build-system gnu-build-system)
     (inputs
-     (list ncurses readline))
+     (list ncurses readline gdb))
     (native-inputs
      (list flex texinfo))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+        (add-after 'unpack 'fix-paths
+         (lambda* (#:key inputs #:allow-other-keys)
+          (let ((gdb (assoc-ref inputs "gdb")))
+           (substitute* "lib/util/fork_util.cpp"
+            (("GDB = \"gdb\"") (string-append "GDB = \"" gdb "/bin/gdb\"")))
+           (substitute* "cgdb/cgdb.cpp"
+            (("/bin/sh") (which "sh")))))))))
     (home-page "https://cgdb.github.io")
     (synopsis "Console front-end to the GNU debugger")
     (description
-- 
2.35.1





This bug report was last modified 3 years and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.