gdb: Look for debug info in /run/current-system/sw/lib/debug

The previous default was $out/lib/debug, which wasn't very useful.

This ensures that you can do

environment.systemPackages = [ pkgs.hello.debug ];

to install debug info.

Changed files
+3 -1
nixos
modules
pkgs
development
tools
misc
+2 -1
nixos/modules/config/system-path.nix
···
[ "/bin"
"/etc/xdg"
"/info"
-
"/lib"
+
"/lib" # FIXME: remove
+
#"/lib/debug/.build-id" # enables GDB to find separated debug info
"/man"
"/sbin"
"/share/applications"
+1
pkgs/development/tools/misc/gdb/default.nix
···
configureFlags = with stdenv.lib;
'' --with-gmp=${gmp} --with-mpfr=${mpfr} --with-system-readline
--with-expat --with-libexpat-prefix=${expat}
+
--with-separate-debug-dir=/run/current-system/sw/lib/debug
''
+ optionalString (target != null) " --target=${target.config}"
+ optionalString (elem stdenv.system platforms.cygwin) " --without-python";