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