git.iko.soy/typeable/nixpkgs
on master help sign in
flex: bring back 2.6.1 as an option

Some breakages after flex update aren't so easy to fix, and I can't really afford to spend much time on it ATM.

commitcf1d3677d3470e3d5a00f2151aa0e09caefd3412 authorVladimír Čunát <vcunat@gmail.com> dateFri 6 Jan 2017, 16:11 (10 years ago) parent75fc704
2 files changed+38
pkgs/development/tools/parsing/flex/2.6.1.nix+37 pkgs/top-level/all-packages.nix+1
pkgs/development/tools/parsing/flex/2.6.1.nixnew file+37
@@ -0,0 +1,37 @@
1+{ stdenv, fetchurl, bison, m4 }:
2+
3+stdenv.mkDerivation rec {
4+ name = "flex-2.6.1";
5+
6+ src = fetchurl {
7+ url = "https://github.com/westes/flex/releases/download/v2.6.1/flex-2.6.1.tar.gz";
8+ sha256 = "0fy14c35yz2m1n1m4f02by3501fn0cca37zn7jp8lpp4b3kgjhrw";
9+ };
10+
11+ buildInputs = [ bison ];
12+
13+ propagatedNativeBuildInputs = [ m4 ];
14+
15+ postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
16+ sed -i Makefile -e 's/-no-undefined//;'
17+ '';
18+
19+ crossAttrs = {
20+
21+ # disable tests which can't run on build machine
22+ postPatch = ''
23+ substituteInPlace Makefile.in --replace "tests" " ";
24+ '';
25+
26+ preConfigure = ''
27+ export ac_cv_func_malloc_0_nonnull=yes
28+ export ac_cv_func_realloc_0_nonnull=yes
29+ '';
30+ };
31+
32+ meta = {
33+ homepage = https://github.com/westes/flex;
34+ description = "A fast lexical analyser generator";
35+ platforms = stdenv.lib.platforms.unix;
36+ };
37+}
pkgs/top-level/all-packages.nix+1
@@ -6276,6 +6276,7 @@ in
62766276 jdepend = callPackage ../development/tools/analysis/jdepend { };
62776277
62786278 flex_2_5_35 = callPackage ../development/tools/parsing/flex/2.5.35.nix { };
6279+ flex_2_6_1 = callPackage ../development/tools/parsing/flex/2.6.1.nix { };
62796280 flex = callPackage ../development/tools/parsing/flex/default.nix { };
62806281
62816282 flexcpp = callPackage ../development/tools/parsing/flexc++ { };