Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 78 lines 1.5 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, pkg-config 6, docutils 7, pandoc 8, ethtool 9, iproute2 10, libnl 11, udev 12, python3 13, perl 14} : 15 16stdenv.mkDerivation (finalAttrs: { 17 pname = "rdma-core"; 18 version = "52.0"; 19 20 src = fetchFromGitHub { 21 owner = "linux-rdma"; 22 repo = "rdma-core"; 23 rev = "v${finalAttrs.version}"; 24 hash = "sha256-M4nmnfeEIxsaFO1DJV9jKD/NnkaLHVNXtfTPf2pTDs4="; 25 }; 26 27 strictDeps = true; 28 29 outputs = [ "out" "man" "dev" ]; 30 31 nativeBuildInputs = [ 32 cmake 33 docutils 34 pandoc 35 pkg-config 36 python3 37 ]; 38 39 buildInputs = [ 40 ethtool 41 iproute2 42 libnl 43 perl 44 udev 45 ]; 46 47 cmakeFlags = [ 48 "-DCMAKE_INSTALL_RUNDIR=/run" 49 "-DCMAKE_INSTALL_SHAREDSTATEDIR=/var/lib" 50 ]; 51 52 postPatch = '' 53 substituteInPlace srp_daemon/srp_daemon.sh.in \ 54 --replace /bin/rm rm 55 ''; 56 57 postInstall = '' 58 # cmake script is buggy, move file manually 59 mkdir -p $out/${perl.libPrefix} 60 mv $out/share/perl5/* $out/${perl.libPrefix} 61 ''; 62 63 postFixup = '' 64 for pls in $out/bin/{ibfindnodesusing.pl,ibidsverify.pl}; do 65 echo "wrapping $pls" 66 substituteInPlace $pls --replace \ 67 "${perl}/bin/perl" "${perl}/bin/perl -I $out/${perl.libPrefix}" 68 done 69 ''; 70 71 meta = { 72 description = "RDMA Core Userspace Libraries and Daemons"; 73 homepage = "https://github.com/linux-rdma/rdma-core"; 74 license = lib.licenses.gpl2Only; 75 platforms = lib.platforms.linux; 76 maintainers = [ lib.maintainers.markuskowa ]; 77 }; 78})