2020-07-06 05:51:46 +00:00
|
|
|
{ lib, stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext, xz, setupDebugInfoDirs, argp-standalone }:
|
2009-02-17 16:42:51 +00:00
|
|
|
|
2012-01-05 23:15:48 +00:00
|
|
|
# TODO: Look at the hardcoded paths to kernel, modules etc.
|
2009-02-17 16:42:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "elfutils";
|
2020-06-26 13:17:01 +00:00
|
|
|
version = "0.180";
|
2013-03-17 09:26:44 +00:00
|
|
|
|
2009-02-17 16:42:51 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://sourceware.org/elfutils/ftp/${version}/${pname}-${version}.tar.bz2";
|
2020-06-26 13:17:01 +00:00
|
|
|
sha256 = "17an1f67bfzxin482nbcxdl5qvywm27i9kypjyx8ilarbkivc9xq";
|
2009-02-17 16:42:51 +00:00
|
|
|
};
|
|
|
|
|
2019-09-07 07:20:19 +00:00
|
|
|
patches = [ ./debug-info-from-env.patch ];
|
2017-07-28 14:10:59 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2012-01-06 16:45:14 +00:00
|
|
|
# We need bzip2 in NativeInputs because otherwise we can't unpack the src,
|
|
|
|
# as the host-bzip2 will be in the path.
|
2016-01-15 13:59:53 +00:00
|
|
|
nativeBuildInputs = [ m4 bison flex gettext bzip2 ];
|
2020-07-06 05:51:46 +00:00
|
|
|
buildInputs = [ zlib bzip2 xz ]
|
|
|
|
++ lib.optional stdenv.hostPlatform.isMusl argp-standalone;
|
2016-01-15 13:59:53 +00:00
|
|
|
|
2017-07-28 14:10:59 +00:00
|
|
|
propagatedNativeBuildInputs = [ setupDebugInfoDirs ];
|
|
|
|
|
2020-07-06 05:51:46 +00:00
|
|
|
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
|
|
NIX_CFLAGS_COMPILE+=" -fgnu89-inline"
|
|
|
|
'';
|
|
|
|
|
2016-01-15 13:59:53 +00:00
|
|
|
configureFlags =
|
|
|
|
[ "--program-prefix=eu-" # prevent collisions with binutils
|
|
|
|
"--enable-deterministic-archives"
|
2020-06-26 13:17:01 +00:00
|
|
|
"--disable-debuginfod"
|
2016-01-15 13:59:53 +00:00
|
|
|
];
|
2012-01-06 16:45:14 +00:00
|
|
|
|
2016-01-15 13:59:53 +00:00
|
|
|
enableParallelBuilding = true;
|
2013-04-05 22:45:25 +00:00
|
|
|
|
2018-08-08 21:10:14 +00:00
|
|
|
doCheck = false; # fails 3 out of 174 tests
|
|
|
|
doInstallCheck = false; # fails 70 out of 174 tests
|
|
|
|
|
2009-02-17 16:42:51 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://sourceware.org/elfutils/";
|
2016-01-15 13:59:53 +00:00
|
|
|
description = "A set of utilities to handle ELF objects";
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.gpl3;
|
2016-11-20 17:05:18 +00:00
|
|
|
maintainers = [ lib.maintainers.eelco ];
|
2009-02-17 16:42:51 +00:00
|
|
|
};
|
|
|
|
}
|