2024-06-30 08:16:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
autoreconfHook,
|
|
|
|
flex,
|
|
|
|
bison,
|
|
|
|
texinfo,
|
|
|
|
help2man,
|
|
|
|
m4,
|
|
|
|
}:
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "flex";
|
|
|
|
version = "2.5.35";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2024-06-30 08:16:52 +00:00
|
|
|
url = "https://github.com/westes/flex/archive/flex-${
|
|
|
|
lib.replaceStrings [ "." ] [ "-" ] version
|
|
|
|
}.tar.gz";
|
2024-05-02 00:46:19 +00:00
|
|
|
sha256 = "0wh06nix8bd4w1aq4k2fbbkdq5i30a9lxz3xczf3ff28yy0kfwzm";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flex
|
|
|
|
bison
|
|
|
|
texinfo
|
|
|
|
help2man
|
|
|
|
autoreconfHook
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ m4 ];
|
|
|
|
|
|
|
|
preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
|
|
|
ac_cv_func_malloc_0_nonnull=yes
|
|
|
|
ac_cv_func_realloc_0_nonnull=yes
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # fails 2 out of 46 tests
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
branch = "2.5.35";
|
|
|
|
homepage = "https://flex.sourceforge.net/";
|
|
|
|
description = "A fast lexical analyser generator";
|
|
|
|
mainProgram = "flex";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|