flex: Use native dependencies where applicable

Flex needs both a C compiler for the build environment, as well as a native m4.

(cherry picked from commit 81827c0084c1a69e41894a4d38b0c0b267eaff34)
This commit is contained in:
Ben Gamari 2017-10-15 12:03:00 -04:00 committed by Will Dietz
parent 4e5a4a92e8
commit e6f9e82ee4
1 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, bison, m4
{ stdenv, buildPackages, fetchurl, bison, m4
, fetchpatch, autoreconfHook, help2man
}:
@ -19,11 +19,10 @@ stdenv.mkDerivation rec {
+ "/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch";
sha256 = "1aarhcmz7mfrgh15pkj6f7ikxa2m0mllw1i1vscsf1kw5d05lw6f";
})];
nativeBuildInputs = [ autoreconfHook help2man ];
nativeBuildInputs = [ buildPackages.stdenv.cc autoreconfHook help2man ];
buildInputs = [ bison ];
propagatedBuildInputs = [ m4 ];
nativePropagatedBuildInputs = [ m4 ];
postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
sed -i Makefile -e 's/-no-undefined//;'