mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 04:13:12 +00:00
glib: fix installing gdb scripts
the disk space cost is less than 20Kb They provide pretty printers for datascructures likes hash tables in gdb. To check that the scripts are loaded: run gdb on any glib application (for example gio from the bin output) run info auto-load python-scripts observe scripts whose filename is libglib-...-gdb.py
This commit is contained in:
parent
f1010e0469
commit
6ccd956fd4
@ -111,6 +111,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# 3. Tools for desktop environment that cannot go to $bin due to $out depending on them ($out)
|
||||
# * gio-launch-desktop
|
||||
./split-dev-programs.patch
|
||||
|
||||
# Tell Meson to install gdb scripts next to the lib
|
||||
# GDB only looks there and in ${gdb}/share/gdb/auto-load,
|
||||
# and by default meson installs in to $out/share/gdb/auto-load
|
||||
# which does not help
|
||||
./gdb_script.patch
|
||||
];
|
||||
|
||||
outputs = [ "bin" "out" "dev" "devdoc" ];
|
||||
@ -208,6 +214,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput "share/glib-2.0" "$dev"
|
||||
moveToOutput "share/glib-2.0/gdb" "$out"
|
||||
substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
|
||||
sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
|
||||
|
||||
|
23
pkgs/development/libraries/glib/gdb_script.patch
Normal file
23
pkgs/development/libraries/glib/gdb_script.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/glib/meson.build b/glib/meson.build
|
||||
index b2dd569e1..b013991a1 100644
|
||||
--- a/glib/meson.build
|
||||
+++ b/glib/meson.build
|
||||
@@ -541,7 +540,7 @@ configure_file(
|
||||
input: 'libglib-gdb.py.in',
|
||||
output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
|
||||
configuration: gdb_conf,
|
||||
- install_dir: gdb_install_dir,
|
||||
+ install_dir: glib_libdir,
|
||||
install_tag: 'devel',
|
||||
install: gdb_install,
|
||||
)
|
||||
diff --git a/gobject/meson.build b/gobject/meson.build
|
||||
@@ -185,7 +184,7 @@ configure_file(
|
||||
input: 'libgobject-gdb.py.in',
|
||||
output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
|
||||
configuration: gdb_conf,
|
||||
- install_dir: gdb_install_dir,
|
||||
+ install_dir: glib_libdir,
|
||||
install_tag: 'devel',
|
||||
install: gdb_install,
|
||||
)
|
Loading…
Reference in New Issue
Block a user