2017-12-27 00:37:48 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, rdma-core,
|
|
|
|
glib, opensm, perl, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "infiniband-diags-${version}";
|
2018-08-21 20:15:44 +02:00
|
|
|
version = "2.1.0";
|
2017-12-27 00:37:48 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linux-rdma";
|
|
|
|
repo = "infiniband-diags";
|
|
|
|
rev = version;
|
2018-08-21 20:15:44 +02:00
|
|
|
sha256 = "1qgyyvnig28x1m47df0zx6b2rcb5nm1k8r02zx7wzfb5pn9k2zh1";
|
2017-12-27 00:37:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf automake libtool pkgconfig makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [ rdma-core glib opensm perl ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export CFLAGS="-I${opensm}/include/infiniband"
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2018-12-15 04:50:31 +01:00
|
|
|
configureFlags = [ "--with-perl-installdir=\${out}/${perl.libPrefix}" "--sbindir=\${out}/bin" ];
|
2017-12-27 00:37:48 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rmdir $out/var/run $out/var
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
for pls in $out/bin/{ibfindnodesusing.pl,ibidsverify.pl}; do
|
|
|
|
echo "wrapping $pls"
|
2018-12-15 04:50:31 +01:00
|
|
|
wrapProgram $pls --prefix PERL5LIB : "$out/${perl.libPrefix}"
|
2017-12-27 00:37:48 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Utilities designed to help configure, debug, and maintain infiniband fabrics";
|
|
|
|
homepage = http://linux-rdma.org/;
|
|
|
|
license = licenses.bsd2; # Or GPL 2
|
|
|
|
maintainers = [ maintainers.aij ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|