Skip to content

Commit

Permalink
Set $NIX_DEBUG_INFO_DIRS when environment.enableDebugInfo is enabled
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
edolstra committed Nov 7, 2017
1 parent e93465c commit d62f29a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nixos/modules/config/debug-info.nix
Expand Up @@ -30,14 +30,15 @@ with lib;
};


config = {
config = mkIf config.environment.enableDebugInfo {

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

environment.extraOutputsToInstall =
optional config.environment.enableDebugInfo "debug";
environment.extraOutputsToInstall = [ "debug" ];

environment.variables.NIX_DEBUG_INFO_DIRS = [ "/run/current-system/sw/lib/debug" ];

};

Expand Down

0 comments on commit d62f29a

Please sign in to comment.