Files
nixpkgs/pkgs/development/tools/misc/elfutils/default.nix
T

76 lines
1.9 KiB
Nix
Raw Normal View History

2016-01-15 14:59:53 +01:00
{ lib, stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext, xz }:
2012-01-05 23:15:48 +00:00
# TODO: Look at the hardcoded paths to kernel, modules etc.
stdenv.mkDerivation rec {
2012-01-05 23:15:48 +00:00
name = "elfutils-${version}";
2017-01-08 15:44:26 -06:00
version = "0.168";
2013-03-17 10:26:44 +01:00
src = fetchurl {
url = "https://sourceware.org/elfutils/ftp/${version}/${name}.tar.bz2";
2017-01-08 15:44:26 -06:00
sha256 = "0xn2fbgda1i703csfs35frvm7l068ybmay4ssrykqdx17f4hg3dq";
};
2016-02-26 18:38:15 +01:00
hardeningDisable = [ "format" ];
2015-12-23 02:59:47 +01: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 14:59:53 +01:00
nativeBuildInputs = [ m4 bison flex gettext bzip2 ];
buildInputs = [ zlib bzip2 xz ];
2016-01-15 14:59:53 +01:00
configureFlags =
[ "--program-prefix=eu-" # prevent collisions with binutils
"--enable-deterministic-archives"
];
enableParallelBuilding = true;
2013-04-06 00:45:25 +02:00
crossAttrs = {
2013-04-06 00:45:25 +02:00
/* Having bzip2 will harm, because anything using elfutils
as buildInput cross-building, will not be able to run 'bzip2' */
propagatedBuildInputs = [ zlib.crossDrv ];
# This program does not cross-build fine. So I only cross-build some parts
# I need for the linux perf tool.
# On the awful cross-building:
# http://comments.gmane.org/gmane.comp.sysutils.elfutils.devel/2005
#
# I wrote this testing for the nanonote.
buildPhase = ''
pushd libebl
make
popd
pushd libelf
make
popd
pushd libdwfl
make
popd
pushd libdw
make
popd
'';
installPhase = ''
pushd libelf
make install
popd
pushd libdwfl
make install
popd
pushd libdw
make install
popd
cp version.h $out/include
'';
};
2013-04-06 00:45:25 +02:00
meta = {
homepage = https://sourceware.org/elfutils/;
2016-01-15 14:59:53 +01:00
description = "A set of utilities to handle ELF objects";
platforms = lib.platforms.linux;
license = lib.licenses.gpl3;
2016-11-20 18:05:18 +01:00
maintainers = [ lib.maintainers.eelco ];
};
}