From ef0b07e94a2fa745d731b0308dbc175be58d0184 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 3 Jun 2017 11:27:33 -0400 Subject: [PATCH] gnu patch: Fix for cross --- pkgs/tools/text/gnupatch/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/text/gnupatch/default.nix b/pkgs/tools/text/gnupatch/default.nix index adbd69154ec..57543eb303b 100644 --- a/pkgs/tools/text/gnupatch/default.nix +++ b/pkgs/tools/text/gnupatch/default.nix @@ -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";