nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.09 52 lines 1.8 kB view raw
1{ stdenv 2, fetchurl, autoreconfHook, gettext 3}: 4 5# Note: this package is used for bootstrapping fetchurl, and thus 6# cannot use fetchpatch! All mutable patches (generated by GitHub or 7# cgit) that are needed here should be included directly in Nixpkgs as 8# files. 9 10stdenv.mkDerivation rec { 11 name = "libelf-0.8.13"; 12 13 src = fetchurl { 14 url = "https://fossies.org/linux/misc/old/${name}.tar.gz"; 15 sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr"; 16 }; 17 18 patches = [ 19 ./dont-hardcode-ar.patch 20 # Fix warnings from preprocessor instructions. 21 # https://github.com/NixOS/nixpkgs/issues/59929 22 ./preprocessor-warnings.patch 23 ]; 24 25 doCheck = true; 26 27 configureFlags = [] 28 # Configure check for dynamic lib support is broken, see 29 # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html 30 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "mr_cv_target_elf=yes" 31 # Libelf's custom NLS macros fail to determine the catalog file extension 32 # on Darwin, so disable NLS for now. 33 ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "--disable-nls"; 34 35 nativeBuildInputs = [ gettext ] 36 # Need to regenerate configure script with newer version in order to pass 37 # "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper` 38 # which doesn't work with the bootstrapTools bash, so can only do this 39 # for cross builds when `stdenv.shell` is a newer bash. 40 ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) autoreconfHook; 41 42 meta = { 43 description = "ELF object file access library"; 44 45 homepage = "https://github.com/Distrotech/libelf"; 46 47 license = stdenv.lib.licenses.lgpl2Plus; 48 49 platforms = stdenv.lib.platforms.all; 50 maintainers = [ ]; 51 }; 52}