diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-10 12:03:17 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-10 12:04:57 +0200 |
commit | ee9a15b32362d28b20704cb2e176dbe5f4421ffb (patch) | |
tree | 524b8c1e64f677068fb4fb7fe9066a9db6588b23 | |
parent | a936d9d6dc31659dbf8115612a0e7efffacb892c (diff) | |
download | nixpkgs-ee9a15b32362d28b20704cb2e176dbe5f4421ffb.tar nixpkgs-ee9a15b32362d28b20704cb2e176dbe5f4421ffb.tar.gz nixpkgs-ee9a15b32362d28b20704cb2e176dbe5f4421ffb.tar.bz2 nixpkgs-ee9a15b32362d28b20704cb2e176dbe5f4421ffb.tar.lz nixpkgs-ee9a15b32362d28b20704cb2e176dbe5f4421ffb.tar.xz nixpkgs-ee9a15b32362d28b20704cb2e176dbe5f4421ffb.tar.zst nixpkgs-ee9a15b32362d28b20704cb2e176dbe5f4421ffb.zip |
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).
-rw-r--r-- | nixos/modules/config/debug-info.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/config/debug-info.nix b/nixos/modules/config/debug-info.nix index 49991d22a93..2942ae5905d 100644 --- a/nixos/modules/config/debug-info.nix +++ b/nixos/modules/config/debug-info.nix @@ -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" ]; }; |