1 { lib, stdenv, fetchFromGitHub, kernel }:
3 stdenv.mkDerivation rec {
4 name = "nvidiabl-${version}-${kernel.version}";
5 version = "2020-10-01";
7 # We use a fork which adds support for newer kernels -- upstream has been abandoned.
8 src = fetchFromGitHub {
11 rev = "9e21bdcb7efedf29450373a2e9ff2913d1b5e3ab";
12 sha256 = "1z57gbnayjid2jv782rpfpp13qdchmbr1vr35g995jfnj624nlgy";
15 hardeningDisable = [ "pic" ];
17 nativeBuildInputs = kernel.moduleBuildDependencies;
20 sed -i 's|/sbin/depmod|#/sbin/depmod|' Makefile
24 "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
26 "KVER=${kernel.modDirVersion}"
30 description = "Linux driver for setting the backlight brightness on laptops using NVIDIA GPU";
31 homepage = "https://github.com/yorickvP/nvidiabl";
32 license = licenses.gpl2Plus;
33 platforms = [ "x86_64-linux" "i686-linux" ];
34 maintainers = with maintainers; [ yorickvp ];
35 broken = kernel.kernelAtLeast "5.18";