summary refs log tree commit diff
path: root/pkgs/development/tools/misc/elfutils/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-28 16:10:59 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-28 16:38:26 +0200
commitcc9bfd2cf8dd9aeb2f625ba2f4506e1e8c67d47c (patch)
tree6f20cc69bca782357291a49690038982b92e8e58 /pkgs/development/tools/misc/elfutils/default.nix
parent340bd1ed2ebff4d6eddb850595ad5e14805f7117 (diff)
downloadnixpkgs-cc9bfd2cf8dd9aeb2f625ba2f4506e1e8c67d47c.tar
nixpkgs-cc9bfd2cf8dd9aeb2f625ba2f4506e1e8c67d47c.tar.gz
nixpkgs-cc9bfd2cf8dd9aeb2f625ba2f4506e1e8c67d47c.tar.bz2
nixpkgs-cc9bfd2cf8dd9aeb2f625ba2f4506e1e8c67d47c.tar.lz
nixpkgs-cc9bfd2cf8dd9aeb2f625ba2f4506e1e8c67d47c.tar.xz
nixpkgs-cc9bfd2cf8dd9aeb2f625ba2f4506e1e8c67d47c.tar.zst
nixpkgs-cc9bfd2cf8dd9aeb2f625ba2f4506e1e8c67d47c.zip
elfutils: Respect $NIX_DEBUG_INFO_DIRS
This makes eu-stack and eu-addr2line do the right thing in a
nix-shell (if the appropriate debug outputs are present).
Diffstat (limited to 'pkgs/development/tools/misc/elfutils/default.nix')
-rw-r--r--pkgs/development/tools/misc/elfutils/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix
index d8e54e47404..591e263205c 100644
--- a/pkgs/development/tools/misc/elfutils/default.nix
+++ b/pkgs/development/tools/misc/elfutils/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext, xz }:
+{ lib, stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext, xz, setupDebugInfoDirs }:
 
 # TODO: Look at the hardcoded paths to kernel, modules etc.
 stdenv.mkDerivation rec {
@@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
     sha256 = "1hiv1yqig3292dwqhrwsxwk3qjalxp5fpl8yphwbfwh8ng3zl4ll";
   };
 
+  patches = ./debug-info-from-env.patch;
+
   hardeningDisable = [ "format" ];
 
   # We need bzip2 in NativeInputs because otherwise we can't unpack the src,
@@ -17,6 +19,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ m4 bison flex gettext bzip2 ];
   buildInputs = [ zlib bzip2 xz ];
 
+  propagatedNativeBuildInputs = [ setupDebugInfoDirs ];
+
   configureFlags =
     [ "--program-prefix=eu-" # prevent collisions with binutils
       "--enable-deterministic-archives"