From 86f398dfc4cf3a10f9c1c6aec67c20318cc7fb19 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sat, 28 Jan 2023 12:00:00 +0000 Subject: [PATCH] gdb: add system-wide configuration file paths are copied from debian and arch. --- pkgs/development/tools/misc/gdb/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 667acd91f349..463383edc8ca 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -81,8 +81,15 @@ stdenv.mkDerivation rec { configurePlatforms = [ "build" "host" "target" ]; - # GDB have to be built out of tree. preConfigure = '' + # remove precompiled docs, required for man gdbinit to mention /etc/gdb/gdbinit + rm gdb/doc/*.info* + rm gdb/doc/*.5 + rm gdb/doc/*.1 + # fix doc build https://sourceware.org/bugzilla/show_bug.cgi?id=27808 + rm gdb/doc/GDBvn.texi + + # GDB have to be built out of tree. mkdir _build cd _build ''; @@ -103,6 +110,9 @@ stdenv.mkDerivation rec { "--with-system-zlib" "--with-system-readline" + "--with-system-gdbinit=/etc/gdb/gdbinit" + "--with-system-gdbinit-dir=/etc/gdb/gdbinit.d" + "--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-expat" "--with-libexpat-prefix=${expat.dev}"