@@ -1,4 +1,7 @@
1−{ stdenv, fetchurl, ed }:
1+{ stdenv, fetchurl
2+, ed
3+, buildPlatform, hostPlatform
4+}:
25
36stdenv.mkDerivation rec {
47 name = "patch-2.7.5";
@@ -10,11 +13,11 @@ stdenv.mkDerivation rec {
1013
1114 buildInputs = stdenv.lib.optional doCheck ed;
1215
13− crossAttrs = {
14− configureFlags = [ "ac_cv_func_strnlen_working=yes" ];
15− };
16+ configureFlags = if hostPlatform == buildPlatform then null else [
17+ "ac_cv_func_strnlen_working=yes"
18+ ];
1619
17− doCheck = true;
20+ doCheck = hostPlatform == buildPlatform;
1821
1922 meta = {
2023 description = "GNU Patch, a program to apply differences to files";