summary refs log tree commit diff
path: root/pkgs/tools/networking/hp2p/default.nix
blob: 52f3455ed4d5acd21e3d5d01b8d515eb7625f4f3 (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
{ lib, stdenv, fetchFromGitHub, mpi, python3Packages, autoconf, automake } :

stdenv.mkDerivation rec {
  pname = "hp2p";
  version = "3.3";

  src = fetchFromGitHub {
    owner = "cea-hpc";
    repo = "hp2p";
    rev = version;
    sha256 = "0zvlwb941rlp3vrf9yzv7njgpj3mh4671ch7qvxfa4hq2ivd52br";
  };

  patches = [ ./python3.patch ];
  enableParallelBuilding = true;
  nativeBuildInputs = [ autoconf automake python3Packages.wrapPython ];
  buildInputs = [ mpi ] ++ (with python3Packages; [ python numpy matplotlib plotly mpldatacursor ]) ;
  pythonPath = (with python3Packages; [ numpy matplotlib plotly mpldatacursor ]) ;

  preConfigure = ''
    patchShebangs autogen.sh
    ./autogen.sh
    export CC=mpicc
    export CXX=mpic++
  '';

  postInstall = ''
    wrapPythonPrograms
  '';

  meta = with lib; {
    description = "A MPI based benchmark for network diagnostics";
    homepage = "https://github.com/cea-hpc/hp2p";
    platforms = platforms.unix;
    license = licenses.cecill-c;
    maintainers = [ maintainers.bzizou ];
  };
}