nixpkgs-suyu/pkgs/applications/networking/netperf/default.nix
Lio李歐 91d52e62d5
netperf: fix Darwin build
This fixes the following build error on Darwin:
```
In file included from ./src/libsmbios_c/common/libsmbios_c_source.h:37:
./src/libsmbios_c/common/select_platform_config.h:16:7: error: "Unknown platform - please report to libsmbios maintainer."
#     error "Unknown platform - please report to libsmbios maintainer."
      ^
1 error generated.
make[1]: *** [Makefile:1728: src/libsmbios_c/common/out_libsmbios_c_la-common.lo] Error 1
```

Per the netperf doc, `libsmbios` is only used on Linux.
2020-12-30 17:13:12 -08:00

30 lines
914 B
Nix

{ libsmbios, stdenv, autoreconfHook, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "netperf";
version = "20180613";
src = fetchFromGitHub {
owner = "HewlettPackard";
repo = "netperf";
rev = "bcb868bde7f0203bbab69609f65d4088ba7398db";
sha256 = "1wbbgdvhadd3qs3afv6i777argdpcyxkwz4yv6aqp223n8ki6dm8";
};
buildInputs = stdenv.lib.optional (with stdenv.hostPlatform; isx86 && isLinux) libsmbios;
nativeBuildInputs = [ autoreconfHook ];
autoreconfPhase = ''
autoreconf -i -I src/missing/m4
'';
configureFlags = [ "--enable-demo" ];
enableParallelBuilding = true;
meta = {
description = "Benchmark to measure the performance of many different types of networking";
homepage = "http://www.netperf.org/netperf/";
license = "Hewlett-Packard BSD-like license";
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.mmlb ];
};
}