2017-03-02 15:10:23 +00:00
|
|
|
{ stdenv, fetchFromGitHub, kernel }:
|
2014-03-07 15:08:38 +00:00
|
|
|
|
2017-03-02 15:10:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nvidiabl-${version}-${kernel.version}";
|
|
|
|
version = "0.87";
|
2014-03-07 15:08:38 +00:00
|
|
|
|
2017-03-02 15:10:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "guillaumezin";
|
|
|
|
repo = "nvidiabl";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1hs61dxn84vsyvrd2s899dhgg342mhfkbdn1nkhcvly45hdp2nca";
|
2014-03-07 15:08:38 +00:00
|
|
|
};
|
|
|
|
|
2016-08-13 15:44:39 +01:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2015-11-14 20:32:51 +00:00
|
|
|
patches = [ ./linux4compat.patch ];
|
|
|
|
|
2014-03-07 15:08:38 +00:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's|/sbin/depmod|#/sbin/depmod|' Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"DESTDIR=$(out)"
|
2015-03-18 01:17:24 +00:00
|
|
|
"KVER=${kernel.modDirVersion}"
|
2014-03-07 15:08:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Linux driver for setting the backlight brightness on laptops using NVIDIA GPU";
|
|
|
|
homepage = https://github.com/guillaumezin/nvidiabl;
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2017-03-02 15:10:57 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
broken = !stdenv.lib.versionOlder kernel.version "4.9";
|
2014-03-07 15:08:38 +00:00
|
|
|
};
|
|
|
|
}
|