From 1fb3110b84f5c016c87ae91e5d129bc688d77d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 3 Sep 2013 22:08:59 +0200 Subject: [PATCH] libffi: produce portable library, enable doCheck Thanks to #907. --- pkgs/development/libraries/libffi/default.nix | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 27c3e9f66f3..f8ca40168ef 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -1,6 +1,6 @@ -{ fetchurl, stdenv }: +{ fetchurl, stdenv, dejagnu }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "libffi-3.0.13"; src = fetchurl { @@ -8,15 +8,21 @@ stdenv.mkDerivation (rec { sha256 = "077ibkf84bvcd6rw1m6jb107br63i2pp301rkmsbgg6300adxp8x"; }; + buildInputs = stdenv.lib.optional doCheck dejagnu; + + configureFlags = [ "--with-gcc-arch=generic" ]; # no detection of -march= or -mtune= + doCheck = true; + dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling. + postInstall = # Install headers in the right place. - '' ln -sv "$out/lib/"libffi*/include "$out/include" + '' ln -srv "$out/lib/"libffi*/include "$out/include" ''; meta = { - description = "libffi, a foreign function call interface library"; + description = "A foreign function call interface library"; longDescription = '' The libffi library provides a portable, high level programming @@ -33,7 +39,7 @@ stdenv.mkDerivation (rec { conversions for values passed between the two languages. ''; - homepage = http://sources.redhat.com/libffi/; + homepage = http://sourceware.org/libffi/; # See http://github.com/atgreen/libffi/blob/master/LICENSE . license = "free, non-copyleft"; @@ -43,9 +49,3 @@ stdenv.mkDerivation (rec { }; } -// - -# Don't run the native `strip' when cross-compiling. -(if (stdenv ? cross) - then { dontStrip = true; } - else { }))