Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 44 lines 1.5 kB view raw
1{ stdenv 2, fetchurl, autoreconfHook, gettext 3}: 4 5stdenv.mkDerivation rec { 6 name = "libelf-0.8.13"; 7 8 src = fetchurl { 9 url = "https://fossies.org/linux/misc/old/${name}.tar.gz"; 10 sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr"; 11 }; 12 13 patches = [ 14 ./dont-hardcode-ar.patch 15 ]; 16 17 doCheck = true; 18 19 configureFlags = [] 20 # Configure check for dynamic lib support is broken, see 21 # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html 22 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "mr_cv_target_elf=yes" 23 # Libelf's custom NLS macros fail to determine the catalog file extension 24 # on Darwin, so disable NLS for now. 25 ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "--disable-nls"; 26 27 nativeBuildInputs = [ gettext ] 28 # Need to regenerate configure script with newer version in order to pass 29 # "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper` 30 # which doesn't work with the bootstrapTools bash, so can only do this 31 # for cross builds when `stdenv.shell` is a newer bash. 32 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) autoreconfHook; 33 34 meta = { 35 description = "ELF object file access library"; 36 37 homepage = http://www.mr511.de/software/english.html; 38 39 license = stdenv.lib.licenses.lgpl2Plus; 40 41 platforms = stdenv.lib.platforms.all; 42 maintainers = [ ]; 43 }; 44}