2014-01-07 14:24:59 +01:00
|
|
|
{ stdenv, fetchurl, bison, m4 }:
|
2008-03-20 09:50:15 +00:00
|
|
|
|
2015-11-18 17:49:54 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2016-12-30 20:36:03 +01:00
|
|
|
name = "flex-${version}";
|
2017-07-29 19:14:47 +02:00
|
|
|
version = "2.6.4";
|
2014-01-07 14:24:59 +01:00
|
|
|
|
2008-03-20 09:50:15 +00:00
|
|
|
src = fetchurl {
|
2016-12-30 20:36:03 +01:00
|
|
|
url = "https://github.com/westes/flex/releases/download/v${version}/flex-${version}.tar.gz";
|
2017-07-29 19:14:47 +02:00
|
|
|
sha256 = "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8";
|
2008-03-20 09:50:15 +00:00
|
|
|
};
|
2014-01-07 14:24:59 +01:00
|
|
|
|
|
|
|
buildInputs = [ bison ];
|
|
|
|
|
2017-08-14 16:39:03 -04:00
|
|
|
propagatedBuildInputs = [ m4 ];
|
2008-03-20 09:50:15 +00:00
|
|
|
|
2015-06-04 19:26:30 +02:00
|
|
|
postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
|
2014-04-15 05:04:27 -05:00
|
|
|
sed -i Makefile -e 's/-no-undefined//;'
|
|
|
|
'';
|
|
|
|
|
2011-11-04 21:31:07 +00:00
|
|
|
crossAttrs = {
|
2015-12-23 20:57:34 +10:00
|
|
|
|
|
|
|
# disable tests which can't run on build machine
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.in --replace "tests" " ";
|
|
|
|
'';
|
|
|
|
|
2011-11-04 21:31:07 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export ac_cv_func_malloc_0_nonnull=yes
|
|
|
|
export ac_cv_func_realloc_0_nonnull=yes
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2008-03-20 09:50:15 +00:00
|
|
|
meta = {
|
2016-09-23 21:42:08 -04:00
|
|
|
homepage = https://github.com/westes/flex;
|
2008-03-20 09:50:15 +00:00
|
|
|
description = "A fast lexical analyser generator";
|
2016-08-02 20:50:55 +03:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2008-03-20 09:50:15 +00:00
|
|
|
};
|
|
|
|
}
|