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