depot/third_party/nixpkgs/pkgs/os-specific/linux/digimend/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

50 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
kernel,
}:
stdenv.mkDerivation rec {
pname = "digimend";
version = "13";
src = fetchFromGitHub {
owner = "digimend";
repo = "digimend-kernel-drivers";
rev = "v${version}";
hash = "sha256-YYCxTyoZGMnqC2nKkRi5Z1uofldGvJDGY2/sO9iMNIo=";
};
postPatch = ''
sed 's/udevadm /true /' -i Makefile
sed 's/depmod /true /' -i Makefile
'';
# Fix build on Linux kernel >= 5.18
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=implicit-fallthrough" ];
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 = kernel.makeFlags ++ [
"KVERSION=${kernel.modDirVersion}"
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"DESTDIR=${placeholder "out"}"
"INSTALL_MOD_PATH=${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;
};
}