2014-01-07 13:24:59 +00:00
|
|
|
{ stdenv, fetchurl, bison, m4 }:
|
2008-03-20 09:50:15 +00:00
|
|
|
|
2015-11-19 01:49:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-12-30 19:36:03 +00:00
|
|
|
name = "flex-${version}";
|
2017-07-29 18:14:47 +01:00
|
|
|
version = "2.6.4";
|
2014-01-07 13:24:59 +00:00
|
|
|
|
2008-03-20 09:50:15 +00:00
|
|
|
src = fetchurl {
|
2016-12-30 19:36:03 +00:00
|
|
|
url = "https://github.com/westes/flex/releases/download/v${version}/flex-${version}.tar.gz";
|
2017-07-29 18:14:47 +01:00
|
|
|
sha256 = "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8";
|
2008-03-20 09:50:15 +00:00
|
|
|
};
|
2014-01-07 13:24:59 +00:00
|
|
|
|
|
|
|
buildInputs = [ bison ];
|
|
|
|
|
|
|
|
propagatedNativeBuildInputs = [ m4 ];
|
2008-03-20 09:50:15 +00:00
|
|
|
|
2015-06-04 18:26:30 +01:00
|
|
|
postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
|
2014-04-15 11:04:27 +01:00
|
|
|
sed -i Makefile -e 's/-no-undefined//;'
|
|
|
|
'';
|
|
|
|
|
2011-11-04 21:31:07 +00:00
|
|
|
crossAttrs = {
|
2015-12-23 10:57:34 +00: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-24 02:42:08 +01:00
|
|
|
homepage = https://github.com/westes/flex;
|
2008-03-20 09:50:15 +00:00
|
|
|
description = "A fast lexical analyser generator";
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2008-03-20 09:50:15 +00:00
|
|
|
};
|
|
|
|
}
|