gnu patch: Fix for cross

This commit is contained in:
John Ericson 2017-06-03 11:27:33 -04:00 committed by John Ericson
parent 7bdacad8b3
commit ef0b07e94a

View File

@ -1,4 +1,7 @@
{ stdenv, fetchurl, ed }:
{ stdenv, fetchurl
, ed
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
name = "patch-2.7.5";
@ -10,11 +13,11 @@ stdenv.mkDerivation rec {
buildInputs = stdenv.lib.optional doCheck ed;
crossAttrs = {
configureFlags = [ "ac_cv_func_strnlen_working=yes" ];
};
configureFlags = if hostPlatform == buildPlatform then null else [
"ac_cv_func_strnlen_working=yes"
];
doCheck = true;
doCheck = hostPlatform == buildPlatform;
meta = {
description = "GNU Patch, a program to apply differences to files";