2022-11-02 22:02:43 +00:00
|
|
|
{ lib, stdenv, fetchzip, fetchpatch, kernel }:
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dpdk-kmods";
|
2022-11-02 22:02:43 +00:00
|
|
|
version = "2022-08-29";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2022-11-02 22:02:43 +00:00
|
|
|
url = "https://git.dpdk.org/dpdk-kmods/snapshot/dpdk-kmods-4a589f7bed00fc7009c93d430bd214ac7ad2bb6b.tar.xz";
|
|
|
|
sha256 = "sha256-l9asJuw2nl63I1BxK6udy2pNunRiMJxyoXeg9V5+WgI=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://git.launchpad.net/ubuntu/+source/dpdk-kmods/plain/debian/patches/0001-support-linux-5.18.patch?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd";
|
|
|
|
sha256 = "sha256-j4kpx1DOnmf5lFxOhaVFNT7prEy1jrJERX2NFaybTPU=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
|
|
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
KSRC = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
preBuild = "cd linux/igb_uio";
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
make -C ${KSRC} M=$(pwd) modules_install $makeFlags
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Kernel modules for DPDK";
|
|
|
|
homepage = "https://git.dpdk.org/dpdk-kmods/";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|