nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 76 lines 2.0 kB view raw
1{ lib, stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext, xz, setupDebugInfoDirs }: 2 3# TODO: Look at the hardcoded paths to kernel, modules etc. 4stdenv.mkDerivation rec { 5 pname = "elfutils"; 6 version = "0.176"; 7 8 src = fetchurl { 9 url = "https://sourceware.org/elfutils/ftp/${version}/${pname}-${version}.tar.bz2"; 10 sha256 = "08qhrl4g6qqr4ga46jhh78y56a47p3msa5b2x1qhzbxhf71lfmzb"; 11 }; 12 13 patches = [ ./debug-info-from-env.patch ]; 14 15 hardeningDisable = [ "format" ]; 16 17 # We need bzip2 in NativeInputs because otherwise we can't unpack the src, 18 # as the host-bzip2 will be in the path. 19 nativeBuildInputs = [ m4 bison flex gettext bzip2 ]; 20 buildInputs = [ zlib bzip2 xz ]; 21 22 propagatedNativeBuildInputs = [ setupDebugInfoDirs ]; 23 24 configureFlags = 25 [ "--program-prefix=eu-" # prevent collisions with binutils 26 "--enable-deterministic-archives" 27 ]; 28 29 enableParallelBuilding = true; 30 31 # This program does not cross-build fine. So I only cross-build some parts 32 # I need for the linux perf tool. 33 # On the awful cross-building: 34 # http://comments.gmane.org/gmane.comp.sysutils.elfutils.devel/2005 35 # 36 # I wrote this testing for the nanonote. 37 38 buildPhase = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 39 pushd libebl 40 make 41 popd 42 pushd libelf 43 make 44 popd 45 pushd libdwfl 46 make 47 popd 48 pushd libdw 49 make 50 popd 51 ''; 52 53 installPhase = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 54 pushd libelf 55 make install 56 popd 57 pushd libdwfl 58 make install 59 popd 60 pushd libdw 61 make install 62 popd 63 cp version.h $out/include 64 ''; 65 66 doCheck = false; # fails 3 out of 174 tests 67 doInstallCheck = false; # fails 70 out of 174 tests 68 69 meta = { 70 homepage = https://sourceware.org/elfutils/; 71 description = "A set of utilities to handle ELF objects"; 72 platforms = lib.platforms.linux; 73 license = lib.licenses.gpl3; 74 maintainers = [ lib.maintainers.eelco ]; 75 }; 76}