2024-05-03 09:23:20 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
kernel,
|
|
|
|
}:
|
2019-11-03 09:57:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "digimend";
|
2024-05-03 09:23:20 +00:00
|
|
|
version = "13";
|
2019-11-03 09:57:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "digimend";
|
|
|
|
repo = "digimend-kernel-drivers";
|
2024-05-03 09:23:20 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-YYCxTyoZGMnqC2nKkRi5Z1uofldGvJDGY2/sO9iMNIo=";
|
2019-11-03 09:57:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed 's/udevadm /true /' -i Makefile
|
|
|
|
sed 's/depmod /true /' -i Makefile
|
|
|
|
'';
|
|
|
|
|
2022-05-28 14:32:14 +00:00
|
|
|
# Fix build on Linux kernel >= 5.18
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=implicit-fallthrough" ];
|
2019-12-27 18:14:27 +00:00
|
|
|
|
2019-11-03 09:57:15 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-02-10 01:46:11 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2019-11-03 09:57:15 +00:00
|
|
|
"KVERSION=${kernel.modDirVersion}"
|
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"DESTDIR=${placeholder "out"}"
|
2022-02-10 01:46:11 +00:00
|
|
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
2019-11-03 09:57:15 +00:00
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-11-03 09:57:15 +00:00
|
|
|
description = "DIGImend graphics tablet drivers for the Linux kernel";
|
|
|
|
homepage = "https://digimend.github.io/";
|
2024-05-26 12:16:07 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2019-11-03 09:57:15 +00:00
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|