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.

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