at master 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 autoreconfHook, 6 flex, 7 bison, 8 texinfo, 9 help2man, 10 m4, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "flex"; 15 version = "2.5.35"; 16 17 src = fetchurl { 18 url = "https://github.com/westes/flex/archive/flex-${ 19 lib.replaceStrings [ "." ] [ "-" ] version 20 }.tar.gz"; 21 sha256 = "0wh06nix8bd4w1aq4k2fbbkdq5i30a9lxz3xczf3ff28yy0kfwzm"; 22 }; 23 24 postPatch = '' 25 patchShebangs tests 26 ''; 27 28 nativeBuildInputs = [ 29 flex 30 bison 31 texinfo 32 help2man 33 autoreconfHook 34 ]; 35 36 propagatedBuildInputs = [ m4 ]; 37 38 preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 39 ac_cv_func_malloc_0_nonnull=yes 40 ac_cv_func_realloc_0_nonnull=yes 41 ''; 42 43 doCheck = false; # fails 2 out of 46 tests 44 45 meta = with lib; { 46 branch = "2.5.35"; 47 homepage = "https://flex.sourceforge.net/"; 48 description = "Fast lexical analyser generator"; 49 mainProgram = "flex"; 50 license = licenses.bsd2; 51 platforms = platforms.unix; 52 }; 53}