git.iko.soy/typeable/nixpkgs
on master help sign in
gnu patch: Fix for cross
commitef0b07e94a2fa745d731b0308dbc175be58d0184 authorJohn Ericson <Ericson2314@Yahoo.com> dateSat 3 Jun 2017, 11:27 (9 years ago) parent7bdacad
1 file changed+8−5
pkgs/tools/text/gnupatch/default.nix+8−5
pkgs/tools/text/gnupatch/default.nix+8−5
@@ -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";