at 16.09-beta 37 lines 883 B view raw
1{ stdenv, fetchurl, bison, m4 }: 2 3stdenv.mkDerivation rec { 4 name = "flex-2.6.0"; 5 6 src = fetchurl { 7 url = "mirror://sourceforge/flex/${name}.tar.bz2"; 8 sha256 = "1sdqx63yadindzafrq1w31ajblf9gl1c301g068s20s7bbpi3ri4"; 9 }; 10 11 buildInputs = [ bison ]; 12 13 propagatedNativeBuildInputs = [ m4 ]; 14 15 postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) '' 16 sed -i Makefile -e 's/-no-undefined//;' 17 ''; 18 19 crossAttrs = { 20 21 # disable tests which can't run on build machine 22 postPatch = '' 23 substituteInPlace Makefile.in --replace "tests" " "; 24 ''; 25 26 preConfigure = '' 27 export ac_cv_func_malloc_0_nonnull=yes 28 export ac_cv_func_realloc_0_nonnull=yes 29 ''; 30 }; 31 32 meta = { 33 homepage = http://flex.sourceforge.net/; 34 description = "A fast lexical analyser generator"; 35 platforms = stdenv.lib.platforms.unix; 36 }; 37}