1{ fetchurl, stdenv, gettext, glibc }:
2
3stdenv.mkDerivation (rec {
4 name = "libelf-0.8.13";
5
6 src = fetchurl {
7 url = "http://www.mr511.de/software/${name}.tar.gz";
8 sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr";
9 };
10
11 doCheck = true;
12
13 # For cross-compiling, native glibc is needed for the "gencat" program.
14 crossAttrs = {
15 nativeBuildInputs = [ glibc ];
16 };
17
18 buildInputs = [ gettext ];
19
20 meta = {
21 description = "ELF object file access library";
22
23 homepage = http://www.mr511.de/software/english.html;
24
25 license = stdenv.lib.licenses.lgpl2Plus;
26
27 platforms = stdenv.lib.platforms.all;
28 maintainers = [ ];
29 };
30}
31
32//
33
34# Libelf's custom NLS macros fail to determine the catalog file extension on
35# Darwin, so disable NLS for now.
36# FIXME: Eventually make Gettext a build input on all platforms.
37(if stdenv.isDarwin
38 then { configureFlags = [ "--disable-nls" ]; }
39 else { }))