about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/qperf/default.nix
blob: a074cde448d9be93146853f664b089d22cbc6bde (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ stdenv, lib
, fetchFromGitHub, fetchpatch
, autoconf, automake, perl, rdma-core }:

stdenv.mkDerivation rec {
  pname = "qperf";
  version = "0.4.11";

  src = fetchFromGitHub {
    owner = "linux-rdma";
    repo = "qperf";
    rev = "v${version}";
    hash = "sha256-x9l8xqwMDHlXRZpWt3XiqN5xyCTV5rk8jp/ClRPPECI=";
  };

  patches = [ (fetchpatch {
    name = "version-bump.patch";
    url = "https://github.com/linux-rdma/qperf/commit/34ec57ddb7e5ae1adfcfc8093065dff90b69a275.patch";
    hash = "sha256-+7ckhUUB+7BG6qRKv0wgyIxkyvll2xjf3Wk1hpRsDo0=";
  }) ];

  nativeBuildInputs = [ autoconf automake perl rdma-core ];
  buildInputs = [ rdma-core ];

  postUnpack =  ''
    patchShebangs .
  '';

  configurePhase = ''
    runHook preConfigure
    ./autogen.sh
    ./configure --prefix=$out
    runHook postConfigure
  '';

  meta = with lib; {
    description = "Measure RDMA and IP performance";
    homepage = "https://github.com/linux-rdma/qperf";
    license = licenses.gpl2Only;
    platforms = platforms.linux;
    maintainers = with maintainers; [ edwtjo ];
  };
}