nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.09 56 lines 1.9 kB view raw
1{ stdenv, fetchurl, fetchpatch 2, autoreconfHook 3 4}: 5 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 9# files. 10 11stdenv.mkDerivation rec { 12 name = "libffi-3.3"; 13 14 src = fetchurl { 15 url = "https://sourceware.org/pub/libffi/${name}.tar.gz"; 16 sha256 = "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"; 17 }; 18 19 patches = []; 20 21 outputs = [ "out" "dev" "man" "info" ]; 22 23 configureFlags = [ 24 "--with-gcc-arch=generic" # no detection of -march= or -mtune= 25 "--enable-pax_emutramp" 26 ]; 27 28 preCheck = '' 29 # The tests use -O0 which is not compatible with -D_FORTIFY_SOURCE. 30 NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/} 31 ''; 32 33 dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling. 34 35 meta = with stdenv.lib; { 36 description = "A foreign function call interface library"; 37 longDescription = '' 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. 42 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. 50 ''; 51 homepage = "http://sourceware.org/libffi/"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ matthewbauer ]; 54 platforms = platforms.all; 55 }; 56}