11 stdenv.mkDerivation ({
12 pname = "nvidia-open";
13 version = "${kernel.version}-${nvidia_x11.version}";
15 src = fetchFromGitHub {
17 repo = "open-gpu-kernel-modules";
18 rev = nvidia_x11.version;
24 nativeBuildInputs = kernel.moduleBuildDependencies;
26 makeFlags = kernel.makeFlags ++ [
27 "SYSSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
28 "SYSOUT=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
29 "MODLIB=$(out)/lib/modules/${kernel.modDirVersion}"
31 aarch64-linux = "TARGET_ARCH=aarch64";
32 x86_64-linux = "TARGET_ARCH=x86_64";
33 }.${stdenv.hostPlatform.system}
36 installTargets = [ "modules_install" ];
37 enableParallelBuilding = true;
40 description = "NVIDIA Linux Open GPU Kernel Module";
41 homepage = "https://github.com/NVIDIA/open-gpu-kernel-modules";
42 license = with licenses; [ gpl2Plus mit ];
43 platforms = [ "x86_64-linux" "aarch64-linux" ];
44 maintainers = with maintainers; [ nickcao ];
47 } // lib.optionalAttrs stdenv.hostPlatform.isAarch64 {
48 env.NIX_CFLAGS_COMPILE = "-fno-stack-protector";