1{ stdenv, fetchurl
2, gettext, glibc
3, buildPlatform, hostPlatform
4}:
5
6stdenv.mkDerivation rec {
7 name = "libelf-0.8.13";
8
9 src = fetchurl {
10 url = "http://www.mr511.de/software/${name}.tar.gz";
11 sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr";
12 };
13
14 patches = [
15 ./dont-hardcode-ar.patch
16 ];
17
18 doCheck = true;
19
20 # FIXME needs gcc 4.9 in bootstrap tools
21 hardeningDisable = [ "stackprotector" ];
22
23 # Libelf's custom NLS macros fail to determine the catalog file extension on
24 # Darwin, so disable NLS for now.
25 # FIXME: Eventually make Gettext a build input on all platforms.
26 configureFlags = stdenv.lib.optional hostPlatform.isDarwin "--disable-nls";
27
28 nativeBuildInputs = [ gettext ];
29
30 meta = {
31 description = "ELF object file access library";
32
33 homepage = http://www.mr511.de/software/english.html;
34
35 license = stdenv.lib.licenses.lgpl2Plus;
36
37 platforms = stdenv.lib.platforms.all;
38 maintainers = [ ];
39 };
40}