at release-16.03-start 75 lines 1.9 kB view raw
1{ lib, stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext, xz }: 2 3# TODO: Look at the hardcoded paths to kernel, modules etc. 4stdenv.mkDerivation rec { 5 name = "elfutils-${version}"; 6 version = "0.165"; 7 8 src = fetchurl { 9 url = "http://fedorahosted.org/releases/e/l/elfutils/${version}/${name}.tar.bz2"; 10 sha256 = "0wp91hlh9n0ismikljf63558rzdwim8w1s271grsbaic35vr5z57"; 11 }; 12 13 patches = [ ./glibc-2.21.patch ]; 14 15 # We need bzip2 in NativeInputs because otherwise we can't unpack the src, 16 # as the host-bzip2 will be in the path. 17 nativeBuildInputs = [ m4 bison flex gettext bzip2 ]; 18 buildInputs = [ zlib bzip2 xz ]; 19 20 configureFlags = 21 [ "--program-prefix=eu-" # prevent collisions with binutils 22 "--enable-deterministic-archives" 23 ]; 24 25 enableParallelBuilding = true; 26 27 crossAttrs = { 28 29 /* Having bzip2 will harm, because anything using elfutils 30 as buildInput cross-building, will not be able to run 'bzip2' */ 31 propagatedBuildInputs = [ zlib.crossDrv ]; 32 33 # This program does not cross-build fine. So I only cross-build some parts 34 # I need for the linux perf tool. 35 # On the awful cross-building: 36 # http://comments.gmane.org/gmane.comp.sysutils.elfutils.devel/2005 37 # 38 # I wrote this testing for the nanonote. 39 buildPhase = '' 40 pushd libebl 41 make 42 popd 43 pushd libelf 44 make 45 popd 46 pushd libdwfl 47 make 48 popd 49 pushd libdw 50 make 51 popd 52 ''; 53 54 installPhase = '' 55 pushd libelf 56 make install 57 popd 58 pushd libdwfl 59 make install 60 popd 61 pushd libdw 62 make install 63 popd 64 cp version.h $out/include 65 ''; 66 }; 67 68 meta = { 69 homepage = https://fedorahosted.org/elfutils/; 70 description = "A set of utilities to handle ELF objects"; 71 platforms = lib.platforms.linux; 72 license = lib.licenses.gpl3; 73 maintainers = lib.maintainers.eelco; 74 }; 75}