summary refs log tree commit diff
path: root/pkgs/development/libraries/librdmacm/default.nix
blob: 791e59cbc906a9a731b49a7008cf5eb698c4d640 (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
{ stdenv, fetchurl, libibverbs }:

stdenv.mkDerivation rec {
  name = "librdmacm-${version}";
  version = "1.0.21";

  src = fetchurl {
    url = "https://www.openfabrics.org/downloads/rdmacm/${name}.tar.gz";
    sha256 = "0yx2wr5dvmf5apvc4f4r2f2mlvn05piwvxsqfb60p3rk4jfx56dx";
  };

  buildInputs = [ libibverbs ];

  postInstall = ''
    mkdir -p $out/lib/pkgconfig
    cat >$out/lib/pkgconfig/rdmacm.pc <<EOF
    prefix=$out
    exec_prefix=\''${prefix}
    libdir=\''${exec_prefix}/lib
    includedir=\''${prefix}/include

    Name: RDMA library
    Version: ${version}
    Description: Library for managing RDMA connections
    Libs: -L\''${libdir} -lrdmacm
    Cflags: -I\''${includedir}
    EOF
  '';

  meta = with stdenv.lib; {
    homepage = https://www.openfabrics.org/;
    platforms = with platforms; linux ++ freebsd;
    license = licenses.bsd2;
    maintainers = with maintainers; [ wkennington ];
  };
}