summary refs log tree commit diff
path: root/pkgs/development/tools/parsing/flex
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/parsing/flex')
-rw-r--r--pkgs/development/tools/parsing/flex/2.5.35.nix6
-rw-r--r--pkgs/development/tools/parsing/flex/2.6.1.nix11
-rw-r--r--pkgs/development/tools/parsing/flex/default.nix5
3 files changed, 16 insertions, 6 deletions
diff --git a/pkgs/development/tools/parsing/flex/2.5.35.nix b/pkgs/development/tools/parsing/flex/2.5.35.nix
index 3e40ddee9d9a..7e09b0a8cd38 100644
--- a/pkgs/development/tools/parsing/flex/2.5.35.nix
+++ b/pkgs/development/tools/parsing/flex/2.5.35.nix
@@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
     sha256 = "0wh06nix8bd4w1aq4k2fbbkdq5i30a9lxz3xczf3ff28yy0kfwzm";
   };
 
+  postPatch = ''
+    patchShebangs tests
+  '';
+
   nativeBuildInputs = [ flex bison texinfo help2man autoreconfHook ];
 
   propagatedBuildInputs = [ m4 ];
@@ -17,6 +21,8 @@ stdenv.mkDerivation rec {
     "ac_cv_func_realloc_0_nonnull=yes"
   ];
 
+  doCheck = false; # fails 2 out of 46 tests
+
   meta = with stdenv.lib; {
     branch = "2.5.35";
     homepage = http://flex.sourceforge.net/;
diff --git a/pkgs/development/tools/parsing/flex/2.6.1.nix b/pkgs/development/tools/parsing/flex/2.6.1.nix
index 81685b6ee661..3a46c6c8f01e 100644
--- a/pkgs/development/tools/parsing/flex/2.6.1.nix
+++ b/pkgs/development/tools/parsing/flex/2.6.1.nix
@@ -8,6 +8,12 @@ stdenv.mkDerivation rec {
     sha256 = "0fy14c35yz2m1n1m4f02by3501fn0cca37zn7jp8lpp4b3kgjhrw";
   };
 
+  postPatch = ''
+    patchShebangs tests
+  '' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    substituteInPlace Makefile.in --replace "tests" " ";
+  '';
+
   buildInputs = [ bison ];
 
   propagatedBuildInputs = [ m4 ];
@@ -21,11 +27,6 @@ stdenv.mkDerivation rec {
     sed -i Makefile -e 's/-no-undefined//;'
   '';
 
-  # disable tests which can't run on build machine
-  postPatch = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
-    substituteInPlace Makefile.in --replace "tests" " ";
-  '';
-
   meta = with stdenv.lib; {
     homepage = https://github.com/westes/flex;
     description = "A fast lexical analyser generator";
diff --git a/pkgs/development/tools/parsing/flex/default.nix b/pkgs/development/tools/parsing/flex/default.nix
index 421102a80c9f..d7d27ac9a1cd 100644
--- a/pkgs/development/tools/parsing/flex/default.nix
+++ b/pkgs/development/tools/parsing/flex/default.nix
@@ -19,7 +19,10 @@ stdenv.mkDerivation rec {
         + "/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch";
     sha256 = "1aarhcmz7mfrgh15pkj6f7ikxa2m0mllw1i1vscsf1kw5d05lw6f";
   })];
-  postPatch = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+
+  postPatch = ''
+    patchShebangs tests
+  '' + stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
     substituteInPlace Makefile.in --replace "tests" " "
 
     substituteInPlace doc/Makefile.am --replace 'flex.1: $(top_srcdir)/configure.ac' 'flex.1: '