at 23.05-pre 52 lines 1.4 kB view raw
1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, docutils 2, pandoc, ethtool, iproute2, libnl, udev, python3, perl 3} : 4 5 6stdenv.mkDerivation rec { 7 pname = "rdma-core"; 8 version = "43.0"; 9 10 src = fetchFromGitHub { 11 owner = "linux-rdma"; 12 repo = "rdma-core"; 13 rev = "v${version}"; 14 sha256 = "sha256-tqlanUZpDYT3wgvD0hA1D5RrMdzPzOqoELzuXGhjnz8="; 15 }; 16 17 strictDeps = true; 18 nativeBuildInputs = [ cmake pkg-config pandoc docutils python3 ]; 19 buildInputs = [ libnl ethtool iproute2 udev perl ]; 20 21 cmakeFlags = [ 22 "-DCMAKE_INSTALL_RUNDIR=/run" 23 "-DCMAKE_INSTALL_SHAREDSTATEDIR=/var/lib" 24 ]; 25 26 postPatch = '' 27 substituteInPlace srp_daemon/srp_daemon.sh.in \ 28 --replace /bin/rm rm 29 ''; 30 31 postInstall = '' 32 # cmake script is buggy, move file manually 33 mkdir -p $out/${perl.libPrefix} 34 mv $out/share/perl5/* $out/${perl.libPrefix} 35 ''; 36 37 postFixup = '' 38 for pls in $out/bin/{ibfindnodesusing.pl,ibidsverify.pl}; do 39 echo "wrapping $pls" 40 substituteInPlace $pls --replace \ 41 "${perl}/bin/perl" "${perl}/bin/perl -I $out/${perl.libPrefix}" 42 done 43 ''; 44 45 meta = with lib; { 46 description = "RDMA Core Userspace Libraries and Daemons"; 47 homepage = "https://github.com/linux-rdma/rdma-core"; 48 license = licenses.gpl2Only; 49 platforms = platforms.linux; 50 maintainers = with maintainers; [ markuskowa ]; 51 }; 52}