2023-01-26 15:59:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-02-14 16:58:59 +00:00
|
|
|
, ivsc-driver
|
2023-01-26 15:59:59 +00:00
|
|
|
, kernel
|
|
|
|
}:
|
|
|
|
|
2023-05-20 19:19:52 +00:00
|
|
|
stdenv.mkDerivation {
|
2023-01-26 15:59:59 +00:00
|
|
|
pname = "ipu6-drivers";
|
2023-08-29 22:18:11 +00:00
|
|
|
version = "unstable-2023-08-28";
|
2023-01-26 15:59:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
2023-05-20 19:19:52 +00:00
|
|
|
repo = "ipu6-drivers";
|
2023-08-29 22:18:11 +00:00
|
|
|
rev = "7c3d6ab1e9e234563a0af51286b0a8d60445f2a3";
|
|
|
|
hash = "sha256-D782v6hIqAl2EO1+zKeakURD3UGVP3c7p3ba/61yfW4=";
|
2023-01-26 15:59:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
cp --no-preserve=mode --recursive --verbose \
|
2023-02-14 16:58:59 +00:00
|
|
|
${ivsc-driver.src}/backport-include \
|
|
|
|
${ivsc-driver.src}/drivers \
|
|
|
|
${ivsc-driver.src}/include \
|
2023-01-26 15:59:59 +00:00
|
|
|
.
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
makeFlags = kernel.makeFlags ++ [
|
|
|
|
"KERNELRELEASE=${kernel.modDirVersion}"
|
|
|
|
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
sed -i -e "s,INSTALL_MOD_DIR=,INSTALL_MOD_PATH=$out INSTALL_MOD_DIR=," Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
installTargets = [
|
|
|
|
"modules_install"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/intel/ipu6-drivers";
|
|
|
|
description = "IPU6 kernel driver";
|
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
maintainers = with lib.maintainers; [ hexa ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-05-08 20:08:08 +00:00
|
|
|
# requires 6.1.7 https://github.com/intel/ipu6-drivers/pull/84
|
2023-05-20 19:19:52 +00:00
|
|
|
broken = kernel.kernelOlder "6.1.7";
|
2023-01-26 15:59:59 +00:00
|
|
|
};
|
|
|
|
}
|