about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2018-08-08 21:16:13 +0000
committerJan Malakhovski <oxij@oxij.org>2018-08-11 09:35:22 +0000
commitd3b15144a7ec0fcebaf5ce3ae817ed03d78eaa7f (patch)
tree7e18ac20a3c1d6abea614fb9f3ee16d0d45327c9 /pkgs
parentb9aa37f5ecacdbd11bc16216c6fd7e87676bc14c (diff)
downloadnixlib-d3b15144a7ec0fcebaf5ce3ae817ed03d78eaa7f.tar
nixlib-d3b15144a7ec0fcebaf5ce3ae817ed03d78eaa7f.tar.gz
nixlib-d3b15144a7ec0fcebaf5ce3ae817ed03d78eaa7f.tar.bz2
nixlib-d3b15144a7ec0fcebaf5ce3ae817ed03d78eaa7f.tar.lz
nixlib-d3b15144a7ec0fcebaf5ce3ae817ed03d78eaa7f.tar.xz
nixlib-d3b15144a7ec0fcebaf5ce3ae817ed03d78eaa7f.tar.zst
nixlib-d3b15144a7ec0fcebaf5ce3ae817ed03d78eaa7f.zip
flex, flex_2_6_1: fix tests
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/parsing/flex/2.6.1.nix11
-rw-r--r--pkgs/development/tools/parsing/flex/default.nix5
2 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/development/tools/parsing/flex/2.6.1.nix b/pkgs/development/tools/parsing/flex/2.6.1.nix
index 954c2bbcb245..8115ca19d023 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 = {
     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 1bff2076b9ab..52f7156ee808 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: '