nixpkgs-suyu/pkgs/os-specific/linux/veikk-linux-driver/default.nix
Nicolás Kennedy 1c2347a5d9
veikk-linux-driver: init at 2.0 (#125856)
Add linux kernel driver that enables VEIKK brand digitizer functionality
2021-06-09 12:49:55 +02:00

34 lines
935 B
Nix

{ lib, stdenv, fetchFromGitHub, kernel }:
stdenv.mkDerivation rec {
pname = "veikk-linux-driver";
version = "2.0";
src = fetchFromGitHub {
owner = "jlam55555";
repo = pname;
rev = "v${version}";
sha256 = "11mg74ds58jwvdmi3i7c4chxs6v9g09r9ll22pc2kbxjdnrp8zrn";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
buildInputs = [ kernel ];
buildPhase = ''
make BUILD_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build
'';
installPhase = ''
mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/veikk
install -Dm755 veikk.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/veikk
'';
meta = with lib; {
description = "Linux driver for VEIKK-brand digitizers";
homepage = "https://github.com/jlam55555/veikk-linux-driver/";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ nicbk ];
};
}