1 { lib, stdenv, fetchurl, fetchpatch
6 # Note: this package is used for bootstrapping fetchurl, and thus
7 # cannot use fetchpatch! All mutable patches (generated by GitHub or
8 # cgit) that are needed here should be included directly in Nixpkgs as
11 stdenv.mkDerivation rec {
15 url = "https://sourceware.org/pub/libffi/${name}.tar.gz";
16 sha256 = "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj";
21 outputs = [ "out" "dev" "man" "info" ];
24 "--with-gcc-arch=generic" # no detection of -march= or -mtune=
25 "--enable-pax_emutramp"
29 # The tests use -O0 which is not compatible with -D_FORTIFY_SOURCE.
30 NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/}
33 dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling.
36 description = "A foreign function call interface library";
38 The libffi library provides a portable, high level programming
39 interface to various calling conventions. This allows a
40 programmer to call any function specified by a call interface
41 description at run-time.
43 FFI stands for Foreign Function Interface. A foreign function
44 interface is the popular name for the interface that allows code
45 written in one language to call code written in another
46 language. The libffi library really only provides the lowest,
47 machine dependent layer of a fully featured foreign function
48 interface. A layer must exist above libffi that handles type
49 conversions for values passed between the two languages.
51 homepage = "http://sourceware.org/libffi/";
52 license = licenses.mit;
53 maintainers = with maintainers; [ matthewbauer ];
54 platforms = platforms.all;