2020-02-21 18:11:58 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options.home = {
|
2023-07-01 23:45:18 +00:00
|
|
|
enableDebugInfo = mkEnableOption "" // {
|
|
|
|
description = ''
|
2023-07-01 07:48:09 +00:00
|
|
|
Some Nix packages provide debug symbols for
|
|
|
|
{command}`gdb` in the `debug` output.
|
2020-02-21 18:11:58 +00:00
|
|
|
This option ensures that those are automatically fetched from
|
2023-07-01 07:48:09 +00:00
|
|
|
the binary cache if available and {command}`gdb` is
|
2020-02-21 18:11:58 +00:00
|
|
|
configured to find those symbols.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.home.enableDebugInfo {
|
|
|
|
home.extraOutputsToInstall = [ "debug" ];
|
|
|
|
|
|
|
|
home.sessionVariables = {
|
|
|
|
NIX_DEBUG_INFO_DIRS =
|
|
|
|
"$NIX_DEBUG_INFO_DIRS\${NIX_DEBUG_INFO_DIRS:+:}${config.home.profileDirectory}/lib/debug";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|