depot/third_party/home-manager/modules/misc/debug.nix
Default email 75fa0ae5af Project import generated by Copybara.
GitOrigin-RevId: c3ab5ea047e6dc73df530948f7367455749d8906
2023-08-08 12:19:01 +02:00

26 lines
686 B
Nix

{ config, pkgs, lib, ... }:
with lib;
{
options.home = {
enableDebugInfo = mkEnableOption "" // {
description = ''
Some Nix packages provide debug symbols for
{command}`gdb` in the `debug` output.
This option ensures that those are automatically fetched from
the binary cache if available and {command}`gdb` is
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";
};
};
}