blob: d0f02097587bfb4db5f096499ccf7b68f9abcfba (
plain) (
blame)
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
48
49
50
51
52
53
54
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, kernel }:
assert stdenv.lib.versionAtLeast kernel.version "3.5";
stdenv.mkDerivation rec {
pname = "digimend";
version = "unstable-2019-06-18";
src = fetchFromGitHub {
owner = "digimend";
repo = "digimend-kernel-drivers";
rev = "8b228a755e44106c11f9baaadb30ce668eede5d4";
sha256 = "1l54j85540386a8aypqka7p5hy1b63cwmpsscv9rmmf10f78v8mm";
};
INSTALL_MOD_PATH = "\${out}";
postPatch = ''
sed 's/udevadm /true /' -i Makefile
sed 's/depmod /true /' -i Makefile
'';
patches = [
# Fix build on Linux kernel >= 5.4
# https://github.com/DIGImend/digimend-kernel-drivers/pull/331
(fetchpatch {
url = "https://github.com/DIGImend/digimend-kernel-drivers/commit/fb8a2eb6a9198bb35aaccb81e22dd5ebe36124d1.patch";
sha256 = "1j7l5hsk59gccydpf7n6xx1ki4rm6aka7k879a7ah5jn8p1ylgw9";
})
];
nativeBuildInputs = kernel.moduleBuildDependencies;
postInstall = ''
# Remove module reload hack.
# The hid-rebind unloads and then reloads the hid-* module to ensure that
# the extra/ module is loaded.
rm -r $out/lib/udev
'';
makeFlags = [
"KVERSION=${kernel.modDirVersion}"
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"DESTDIR=${placeholder "out"}"
];
meta = with lib; {
description = "DIGImend graphics tablet drivers for the Linux kernel";
homepage = "https://digimend.github.io/";
license = licenses.gpl2;
maintainers = with maintainers; [ gebner ];
platforms = platforms.linux;
};
}
|