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 meta = {
19 description = "ELF object file access library";
20
21 homepage = http://www.mr511.de/software/english.html;
22
23 license = stdenv.lib.licenses.lgpl2Plus;
24
25 platforms = stdenv.lib.platforms.all;
26 maintainers = [ ];
27 };
28}
29
30//
31
32# Libelf's custom NLS macros fail to determine the catalog file extension on
33# Darwin, so disable NLS for now.
34# FIXME: Eventually make Gettext a build input on all platforms.
35(if stdenv.isDarwin
36 then { configureFlags = [ "--disable-nls" ]; }
37 else { }))