lol
1{ libsmbios, lib, stdenv, autoreconfHook, fetchFromGitHub, fetchpatch }:
2
3stdenv.mkDerivation {
4 pname = "netperf";
5 version = "20210121";
6
7 src = fetchFromGitHub {
8 owner = "HewlettPackard";
9 repo = "netperf";
10 rev = "3bc455b23f901dae377ca0a558e1e32aa56b31c4";
11 sha256 = "s4G1ZN+6LERdEMDkc+12ZQgTi6K+ppUYUCGn4faCS9c=";
12 };
13
14 patches = [
15 # Pul fix pending upstream inclusion for -fno-common toolchains:
16 # https://github.com/HewlettPackard/netperf/pull/46
17 (fetchpatch {
18 name = "fno-common.patch";
19 url = "https://github.com/HewlettPackard/netperf/commit/c6a2e17fe35f0e68823451fedfdf5b1dbecddbe3.patch";
20 sha256 = "P/lRa6EakSalKWDTgZ7bWeGleaTLLa5UhzulxKd1xE4=";
21 })
22 ];
23
24 buildInputs = lib.optional (with stdenv.hostPlatform; isx86 && isLinux) libsmbios;
25 nativeBuildInputs = [ autoreconfHook ];
26 autoreconfPhase = ''
27 autoreconf -i -I src/missing/m4
28 '';
29 configureFlags = [ "--enable-demo" ];
30 enableParallelBuilding = true;
31
32 meta = {
33 description = "Benchmark to measure the performance of many different types of networking";
34 homepage = "http://www.netperf.org/netperf/";
35 license = lib.licenses.mit;
36
37 platforms = lib.platforms.unix;
38 maintainers = [ lib.maintainers.mmlb ];
39 };
40}