Merge pull request #37100 from abbradar/nvidiabl
nvidiabl: 0.87 -> 2017-09-26
This commit is contained in:
commit
2ff2045053
@ -2,18 +2,19 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "nvidiabl-${version}-${kernel.version}";
|
name = "nvidiabl-${version}-${kernel.version}";
|
||||||
version = "0.87";
|
version = "2017-09-26";
|
||||||
|
|
||||||
|
# We use a fork which adds support for newer kernels -- upstream has been abandoned.
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "guillaumezin";
|
owner = "yorickvP";
|
||||||
repo = "nvidiabl";
|
repo = "nvidiabl";
|
||||||
rev = "v${version}";
|
rev = "2d909f4dfceb24ce98479fd571411c6ec3b71bea";
|
||||||
sha256 = "1hs61dxn84vsyvrd2s899dhgg342mhfkbdn1nkhcvly45hdp2nca";
|
sha256 = "0dsar8fsaxwywjh6rbrxkhdp142vqjnsyxfz6bgpbqml6slpiqs1";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningDisable = [ "pic" ];
|
hardeningDisable = [ "pic" ];
|
||||||
|
|
||||||
patches = [ ./linux4compat.patch ];
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
sed -i 's|/sbin/depmod|#/sbin/depmod|' Makefile
|
sed -i 's|/sbin/depmod|#/sbin/depmod|' Makefile
|
||||||
@ -25,11 +26,11 @@ stdenv.mkDerivation rec {
|
|||||||
"KVER=${kernel.modDirVersion}"
|
"KVER=${kernel.modDirVersion}"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Linux driver for setting the backlight brightness on laptops using NVIDIA GPU";
|
description = "Linux driver for setting the backlight brightness on laptops using NVIDIA GPU";
|
||||||
homepage = https://github.com/guillaumezin/nvidiabl;
|
homepage = https://github.com/guillaumezin/nvidiabl;
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||||
broken = !stdenv.lib.versionOlder kernel.version "4.9";
|
maintainers = with maintainers; [ yorickvp ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
From 2bf6f08b2492cc04a2c39fdcb22a2d0c18963d1c Mon Sep 17 00:00:00 2001
|
|
||||||
From: sonic414 <sonic414@gmail.com>
|
|
||||||
Date: Tue, 28 Apr 2015 19:30:15 +0530
|
|
||||||
Subject: [PATCH] strnicmp to strncasecmp in Linux 4.0.0
|
|
||||||
|
|
||||||
---
|
|
||||||
nvidiabl-module.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/nvidiabl-module.c b/nvidiabl-module.c
|
|
||||||
index b789ea4..b306579 100644
|
|
||||||
--- a/nvidiabl-module.c
|
|
||||||
+++ b/nvidiabl-module.c
|
|
||||||
@@ -214,7 +214,7 @@ static int __init nvidiabl_init(void)
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
|
|
||||||
|
|
||||||
for (iii = 0 ; iii < sizeof(backlight_type_ids) ; iii++) {
|
|
||||||
- if (strnicmp(bl_type, backlight_type_ids[iii].id, sizeof(bl_type)) == 0) {
|
|
||||||
+ if (strncasecmp(bl_type, backlight_type_ids[iii].id, sizeof(bl_type)) == 0) {
|
|
||||||
props.type = backlight_type_ids[iii].type;
|
|
||||||
printk(KERN_INFO "nvidiabl: backlight type is %s\n", backlight_type_ids[iii].id);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user