From d7ccc25142f62b4c25a75ae016a1ff552cc446d4 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Fri, 26 May 2023 12:55:01 +0200 Subject: [PATCH] elfutils: split debuginfod into its own output --- pkgs/development/tools/misc/elfutils/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix index 83a30f3e6f17f..faf7496b25f90 100644 --- a/pkgs/development/tools/misc/elfutils/default.nix +++ b/pkgs/development/tools/misc/elfutils/default.nix @@ -41,6 +41,8 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs tests/*.sh + '' + lib.optionalString enableDebuginfod '' + sed -i '1i DESTDIR=$(debuginfod)' debuginfod/Makefile.in '' + lib.optionalString stdenv.hostPlatform.isRiscV '' # disable failing test: # @@ -48,7 +50,10 @@ stdenv.mkDerivation rec { sed -i s/run-backtrace-dwarf.sh//g tests/Makefile.in ''; - outputs = [ "bin" "dev" "out" "man" ]; + # debuginfod goes in its own output, as it increases closure size + # significantly by depending on gcc. Many uses, such as libbpf + # (depended on by systemd), don't need debuginfod. + outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional enableDebuginfod "debuginfod"; # We need bzip2 in NativeInputs because otherwise we can't unpack the src, # as the host-bzip2 will be in the path.