libffi: produce portable library, enable doCheck

Thanks to #907.

+11 -11
+11 -11
pkgs/development/libraries/libffi/default.nix
··· 1 - { fetchurl, stdenv }: 1 + { fetchurl, stdenv, dejagnu }: 2 2 3 - stdenv.mkDerivation (rec { 3 + stdenv.mkDerivation rec { 4 4 name = "libffi-3.0.13"; 5 5 6 6 src = fetchurl { ··· 8 8 sha256 = "077ibkf84bvcd6rw1m6jb107br63i2pp301rkmsbgg6300adxp8x"; 9 9 }; 10 10 11 + buildInputs = stdenv.lib.optional doCheck dejagnu; 12 + 13 + configureFlags = [ "--with-gcc-arch=generic" ]; # no detection of -march= or -mtune= 14 + 11 15 doCheck = true; 12 16 17 + dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling. 18 + 13 19 postInstall = 14 20 # Install headers in the right place. 15 - '' ln -sv "$out/lib/"libffi*/include "$out/include" 21 + '' ln -srv "$out/lib/"libffi*/include "$out/include" 16 22 ''; 17 23 18 24 meta = { 19 - description = "libffi, a foreign function call interface library"; 25 + description = "A foreign function call interface library"; 20 26 21 27 longDescription = '' 22 28 The libffi library provides a portable, high level programming ··· 33 39 conversions for values passed between the two languages. 34 40 ''; 35 41 36 - homepage = http://sources.redhat.com/libffi/; 42 + homepage = http://sourceware.org/libffi/; 37 43 38 44 # See http://github.com/atgreen/libffi/blob/master/LICENSE . 39 45 license = "free, non-copyleft"; ··· 43 49 }; 44 50 } 45 51 46 - // 47 - 48 - # Don't run the native `strip' when cross-compiling. 49 - (if (stdenv ? cross) 50 - then { dontStrip = true; } 51 - else { }))