nixpkgs/pkgs/development/tools/parsing/flex/default.nix

39 lines
953 B
Nix
Raw Normal View History

2014-01-07 14:24:59 +01:00
{ stdenv, fetchurl, bison, m4 }:
2015-11-19 02:49:54 +01:00
stdenv.mkDerivation rec {
name = "flex-${version}";
version = "2.6.3";
2014-01-07 14:24:59 +01:00
src = fetchurl {
url = "https://github.com/westes/flex/releases/download/v${version}/flex-${version}.tar.gz";
sha256 = "1an2cn2z85mkpgqcinh1fhhcd7993qm2lil1yxic8iz76ci79ck8";
};
2014-01-07 14:24:59 +01:00
buildInputs = [ bison ];
propagatedNativeBuildInputs = [ m4 ];
2015-06-04 19:26:30 +02:00
postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
sed -i Makefile -e 's/-no-undefined//;'
'';
crossAttrs = {
# disable tests which can't run on build machine
postPatch = ''
substituteInPlace Makefile.in --replace "tests" " ";
'';
preConfigure = ''
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
'';
};
meta = {
2016-09-24 03:42:08 +02:00
homepage = https://github.com/westes/flex;
description = "A fast lexical analyser generator";
platforms = stdenv.lib.platforms.unix;
};
}