flex: Don't use crossAttrs

This commit is contained in:
John Ericson 2018-07-23 17:35:23 -04:00
parent 4116754f45
commit 1833a04aed
2 changed files with 13 additions and 18 deletions

View File

@ -12,12 +12,10 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ m4 ];
crossAttrs = {
preConfigure = ''
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
'';
};
preConfigure = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
meta = {
branch = "2.5.35";

View File

@ -12,22 +12,19 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ m4 ];
preConfigure = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
sed -i Makefile -e 's/-no-undefined//;'
'';
crossAttrs = {
# disable tests which can't run on build machine
postPatch = ''
substituteInPlace Makefile.in --replace "tests" " ";
'';
preConfigure = ''
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
'';
};
# 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;