From c600d5232d2721474a275a560ba601c947f158cc Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Tue, 9 Feb 2021 00:09:25 +0000 Subject: [PATCH] elfutils: add support for debuginfod Signed-off-by: Arthur Gautier --- pkgs/development/tools/misc/elfutils/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix index 72c8c2fab91..5d85ff166a5 100644 --- a/pkgs/development/tools/misc/elfutils/default.nix +++ b/pkgs/development/tools/misc/elfutils/default.nix @@ -1,6 +1,8 @@ { lib, stdenv, fetchurl, fetchpatch, pkg-config, autoreconfHook, musl-fts , musl-obstack, m4, zlib, bzip2, bison, flex, gettext, xz, setupDebugInfoDirs -, argp-standalone }: +, argp-standalone +, enableDebuginfod ? false, sqlite, curl, libmicrohttpd_0_9_70, libarchive +}: # TODO: Look at the hardcoded paths to kernel, modules etc. stdenv.mkDerivation rec { @@ -57,12 +59,18 @@ stdenv.mkDerivation rec { # We need bzip2 in NativeInputs because otherwise we can't unpack the src, # as the host-bzip2 will be in the path. nativeBuildInputs = [ m4 bison flex gettext bzip2 ] - ++ lib.optional stdenv.hostPlatform.isMusl [ pkg-config autoreconfHook ]; + ++ lib.optional stdenv.hostPlatform.isMusl [ pkg-config autoreconfHook ] + ++ lib.optional enableDebuginfod [ pkg-config ]; buildInputs = [ zlib bzip2 xz ] ++ lib.optional stdenv.hostPlatform.isMusl [ argp-standalone musl-fts musl-obstack + ] ++ lib.optionals enableDebuginfod [ + sqlite + curl + libmicrohttpd_0_9_70 + libarchive ]; propagatedNativeBuildInputs = [ setupDebugInfoDirs ]; @@ -74,6 +82,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--program-prefix=eu-" # prevent collisions with binutils "--enable-deterministic-archives" + ] ++ lib.optionals (!enableDebuginfod) [ "--disable-libdebuginfod" "--disable-debuginfod" ];