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