-
Notifications
You must be signed in to change notification settings - Fork 0
/
ipu6-drivers.nix
47 lines (38 loc) · 1.23 KB
/
ipu6-drivers.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ pkgs, lib, stdenv, kernel, ipu6-drivers-src, ivsc-driver-src, ... }:
let
kernelSrc = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
in
stdenv.mkDerivation rec {
name = "ipu6-drivers-${version}-${kernel.version}";
version = "1.0.0";
passthru.moduleName = "ipu6";
src = ipu6-drivers-src;
nativeBuildInputs = kernel.moduleBuildDependencies;
buildFlags = [
"KERNEL_SRC=${kernelSrc}"
"KERNELRELEASE=${kernel.modDirVersion}"
];
patchPhase = ''
cp -r ${ivsc-driver-src}/{backport-include,drivers,include} .
# For some reason, this copies with 555 instead of 755
chmod -R 755 backport-include drivers include
'';
installPhase = ''
make -C ${kernelSrc} \
M=$(pwd) \
INSTALL_MOD_PATH=$out \
modules_install
cp -r include $out/
'';
meta = with lib; {
maintainers = [ maintainers.mitame ];
#license = [ licenses.gpl2Plus ];
platforms = [ "i686-linux" "x86_64-linux" ];
broken = versionOlder kernel.version "4.14";
description = "Kernel drivers for the IPU and sensors";
homepage = "https://github.com/intel/ipu6-drivers";
longDescription = ''
Drivers for HM11B1, OV01A1S, OV01A10, OV02C10, OV2740, HM2170 and HI556 sensors
'';
};
}