librdmacm: add pkg-config support

+18 -1
+18 -1
pkgs/development/libraries/librdmacm/default.nix
··· 1 1 { stdenv, fetchurl, libibverbs }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "librdmacm-1.0.21"; 4 + name = "librdmacm-${version}"; 5 + version = "1.0.21"; 5 6 6 7 src = fetchurl { 7 8 url = "https://www.openfabrics.org/downloads/rdmacm/${name}.tar.gz"; ··· 9 10 }; 10 11 11 12 buildInputs = [ libibverbs ]; 13 + 14 + postInstall = '' 15 + mkdir -p $out/lib/pkgconfig 16 + cat >$out/lib/pkgconfig/rdmacm.pc <<EOF 17 + prefix=$out 18 + exec_prefix=\''${prefix} 19 + libdir=\''${exec_prefix}/lib 20 + includedir=\''${prefix}/include 21 + 22 + Name: RDMA library 23 + Version: ${version} 24 + Description: Library for managing RDMA connections 25 + Libs: -L\''${libdir} -lrdmacm 26 + Cflags: -I\''${includedir} 27 + EOF 28 + ''; 12 29 13 30 meta = with stdenv.lib; { 14 31 homepage = https://www.openfabrics.org/;