nixpkgs/pkgs/os-specific/linux/rdma-core/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

79 lines
1.5 KiB
Nix
Raw Normal View History

2023-07-29 09:03:16 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, docutils
, pandoc
, ethtool
, iproute2
, libnl
, udev
, python3
, perl
2018-01-20 23:09:14 +00:00
} :
2023-07-29 09:03:16 +00:00
stdenv.mkDerivation (finalAttrs: {
2019-08-13 21:52:01 +00:00
pname = "rdma-core";
2024-01-28 20:40:01 +00:00
version = "50.0";
2018-01-20 23:09:14 +00:00
src = fetchFromGitHub {
owner = "linux-rdma";
repo = "rdma-core";
2023-07-29 09:03:16 +00:00
rev = "v${finalAttrs.version}";
2024-01-28 20:40:01 +00:00
hash = "sha256-PJlbY7QR9b2eVaALpuq/67kRTc91HEhs9Wl7WXtSLmA=";
2018-01-20 23:09:14 +00:00
};
strictDeps = true;
2023-07-29 09:03:16 +00:00
outputs = [ "out" "man" "dev" ];
2023-07-29 09:03:16 +00:00
nativeBuildInputs = [
cmake
docutils
pandoc
pkg-config
python3
];
buildInputs = [
ethtool
iproute2
libnl
perl
udev
];
2018-01-20 23:09:14 +00:00
cmakeFlags = [
"-DCMAKE_INSTALL_RUNDIR=/run"
"-DCMAKE_INSTALL_SHAREDSTATEDIR=/var/lib"
];
2018-01-28 09:09:22 +00:00
postPatch = ''
2019-08-09 09:35:18 +00:00
substituteInPlace srp_daemon/srp_daemon.sh.in \
--replace /bin/rm rm
'';
postInstall = ''
# cmake script is buggy, move file manually
mkdir -p $out/${perl.libPrefix}
mv $out/share/perl5/* $out/${perl.libPrefix}
'';
postFixup = ''
for pls in $out/bin/{ibfindnodesusing.pl,ibidsverify.pl}; do
echo "wrapping $pls"
substituteInPlace $pls --replace \
"${perl}/bin/perl" "${perl}/bin/perl -I $out/${perl.libPrefix}"
2019-08-09 09:35:18 +00:00
done
2018-01-20 23:09:14 +00:00
'';
2023-07-29 09:03:16 +00:00
meta = {
2018-01-20 23:09:14 +00:00
description = "RDMA Core Userspace Libraries and Daemons";
homepage = "https://github.com/linux-rdma/rdma-core";
2023-07-29 09:03:16 +00:00
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.markuskowa ];
2018-01-20 23:09:14 +00:00
};
2023-07-29 09:03:16 +00:00
})