Merge pull request #72698 from gebner/digimend-drivers
digimend drivers for graphics tablets
This commit is contained in:
commit
cb8423d19b
@ -867,6 +867,7 @@
|
||||
./services/x11/hardware/multitouch.nix
|
||||
./services/x11/hardware/synaptics.nix
|
||||
./services/x11/hardware/wacom.nix
|
||||
./services/x11/hardware/digimend.nix
|
||||
./services/x11/hardware/cmt.nix
|
||||
./services/x11/gdk-pixbuf.nix
|
||||
./services/x11/redshift.nix
|
||||
|
43
nixos/modules/services/x11/hardware/digimend.nix
Normal file
43
nixos/modules/services/x11/hardware/digimend.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.xserver.digimend;
|
||||
|
||||
pkg = config.boot.kernelPackages.digimend;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
services.xserver.digimend = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable the digimend drivers for Huion/XP-Pen/etc. tablets.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
# digimend drivers use xsetwacom and wacom X11 drivers
|
||||
services.xserver.wacom.enable = true;
|
||||
|
||||
boot.extraModulePackages = [ pkg ];
|
||||
|
||||
environment.etc."X11/xorg.conf.d/50-digimend.conf".source =
|
||||
"${pkg}/usr/share/X11/xorg.conf.d/50-digimend.conf";
|
||||
|
||||
};
|
||||
|
||||
}
|
45
pkgs/os-specific/linux/digimend/default.nix
Normal file
45
pkgs/os-specific/linux/digimend/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ stdenv, fetchFromGitHub, 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
|
||||
'';
|
||||
|
||||
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 stdenv.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;
|
||||
};
|
||||
}
|
@ -29,7 +29,7 @@ buildEnv {
|
||||
# kernel version number, otherwise depmod will use `uname -r'.
|
||||
if test -w $out/lib/modules/$kernelVersion; then
|
||||
rm -f $out/lib/modules/$kernelVersion/modules.!(builtin*|order*)
|
||||
${kmod}/bin/depmod -b $out -a $kernelVersion
|
||||
${kmod}/bin/depmod -b $out -C $out/etc/depmod.d -a $kernelVersion
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
@ -16140,6 +16140,8 @@ in
|
||||
|
||||
deepin-anything = callPackage ../os-specific/linux/deepin-anything { };
|
||||
|
||||
digimend = callPackage ../os-specific/linux/digimend { };
|
||||
|
||||
dpdk = callPackage ../os-specific/linux/dpdk { };
|
||||
|
||||
exfat-nofuse = callPackage ../os-specific/linux/exfat { };
|
||||
|
Loading…
Reference in New Issue
Block a user