about summary refs log tree commit diff
path: root/pkgs/applications/science/misc/root/default.nix
diff options
context:
space:
mode:
authorYueh-Shun Li <44064051+ShamrockLee@users.noreply.github.com>2023-02-17 19:17:10 +0800
committerYueh-Shun Li <44064051+ShamrockLee@users.noreply.github.com>2023-03-04 15:05:26 +0800
commitc89c22a9c28d0487fbbf0e026ba37239464b0779 (patch)
treef2c797ed745bce891b732f647a98bf32ed88af13 /pkgs/applications/science/misc/root/default.nix
parent94a50428cd76ae16e11425ce080f7bc09c1fba5d (diff)
root: separateDebugInfo = true on Linux
Diffstat (limited to 'pkgs/applications/science/misc/root/default.nix')
-rw-r--r--pkgs/applications/science/misc/root/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix
index cfda819a42ca7..e38bb2ec8fdd7 100644
--- a/pkgs/applications/science/misc/root/default.nix
+++ b/pkgs/applications/science/misc/root/default.nix
@@ -261,6 +261,14 @@ stdenv.mkDerivation rec {
     ]}"
   '';
 
+  # To use the debug information on the fly (without installation)
+  # add the outPath of root.debug into NIX_DEBUG_INFO_DIRS (in PATH-like format)
+  # and make sure that gdb from Nixpkgs can be found in PATH.
+  #
+  # Building with debug info and separating them is not supported on all systems
+  # e.g. Darwin fails to support it (#203380)
+  separateDebugInfo = stdenv.hostPlatform.isLinux;
+
   setupHook = ./setup-hook.sh;
 
   meta = with lib; {