diff --git a/pkgs/applications/networking/netperf/default.nix b/pkgs/applications/networking/netperf/default.nix index 880ebdd2d4ef..7722ab479c56 100644 --- a/pkgs/applications/networking/netperf/default.nix +++ b/pkgs/applications/networking/netperf/default.nix @@ -1,4 +1,4 @@ -{ libsmbios, lib, stdenv, autoreconfHook, fetchFromGitHub }: +{ libsmbios, lib, stdenv, autoreconfHook, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation { pname = "netperf"; @@ -11,6 +11,16 @@ stdenv.mkDerivation { sha256 = "s4G1ZN+6LERdEMDkc+12ZQgTi6K+ppUYUCGn4faCS9c="; }; + patches = [ + # Pul fix pending upstream inclusion for -fno-common toolchains: + # https://github.com/HewlettPackard/netperf/pull/46 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/HewlettPackard/netperf/commit/c6a2e17fe35f0e68823451fedfdf5b1dbecddbe3.patch"; + sha256 = "P/lRa6EakSalKWDTgZ7bWeGleaTLLa5UhzulxKd1xE4="; + }) + ]; + buildInputs = lib.optional (with stdenv.hostPlatform; isx86 && isLinux) libsmbios; nativeBuildInputs = [ autoreconfHook ]; autoreconfPhase = ''