2014-01-07 14:24:59 +01:00
|
|
|
{ stdenv, fetchurl, bison, m4 }:
|
2008-03-20 10:50:15 +01:00
|
|
|
|
2015-11-19 02:49:54 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2016-12-30 20:36:03 +01:00
|
|
|
name = "flex-${version}";
|
|
|
|
version = "2.6.3";
|
2014-01-07 14:24:59 +01:00
|
|
|
|
2008-03-20 10:50:15 +01: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";
|
|
|
|
sha256 = "1an2cn2z85mkpgqcinh1fhhcd7993qm2lil1yxic8iz76ci79ck8";
|
2008-03-20 10:50:15 +01:00
|
|
|
};
|
2014-01-07 14:24:59 +01:00
|
|
|
|
|
|
|
buildInputs = [ bison ];
|
|
|
|
|
|
|
|
propagatedNativeBuildInputs = [ m4 ];
|
2008-03-20 10:50:15 +01:00
|
|
|
|
2015-06-04 19:26:30 +02:00
|
|
|
postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
|
2014-04-15 12:04:27 +02:00
|
|
|
sed -i Makefile -e 's/-no-undefined//;'
|
|
|
|
'';
|
|
|
|
|
2011-11-04 22:31:07 +01:00
|
|
|
crossAttrs = {
|
2015-12-23 11:57:34 +01:00
|
|
|
|
|
|
|
# disable tests which can't run on build machine
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.in --replace "tests" " ";
|
|
|
|
'';
|
|
|
|
|
2011-11-04 22:31:07 +01:00
|
|
|
preConfigure = ''
|
|
|
|
export ac_cv_func_malloc_0_nonnull=yes
|
|
|
|
export ac_cv_func_realloc_0_nonnull=yes
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2008-03-20 10:50:15 +01:00
|
|
|
meta = {
|
2016-09-24 03:42:08 +02:00
|
|
|
homepage = https://github.com/westes/flex;
|
2008-03-20 10:50:15 +01:00
|
|
|
description = "A fast lexical analyser generator";
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2008-03-20 10:50:15 +01:00
|
|
|
};
|
|
|
|
}
|