Skip to content

Commit d62f29a

Browse files
committedNov 7, 2017
Set $NIX_DEBUG_INFO_DIRS when environment.enableDebugInfo is enabled
This allows it to co-exist with other debug info directories, such as the one used by dwarffs (https://github.com/edolstra/dwarffs/blob/master/module.nix). (cherry picked from commit ee9a15b)
1 parent e93465c commit d62f29a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

Diff for: ‎nixos/modules/config/debug-info.nix

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ with lib;
3030
};
3131

3232

33-
config = {
33+
config = mkIf config.environment.enableDebugInfo {
3434

3535
# FIXME: currently disabled because /lib is already in
3636
# environment.pathsToLink, and we can't have both.
3737
#environment.pathsToLink = [ "/lib/debug/.build-id" ];
3838

39-
environment.extraOutputsToInstall =
40-
optional config.environment.enableDebugInfo "debug";
39+
environment.extraOutputsToInstall = [ "debug" ];
40+
41+
environment.variables.NIX_DEBUG_INFO_DIRS = [ "/run/current-system/sw/lib/debug" ];
4142

4243
};
4344

0 commit comments

Comments
 (0)
Please sign in to comment.