linuxPackages.veikk-linux-driver: fix build (#410649)
This commit is contained in:
@@ -6,17 +6,19 @@
|
||||
kernelModuleMakeFlags,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "veikk-linux-driver";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jlam55555";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "11mg74ds58jwvdmi3i7c4chxs6v9g09r9ll22pc2kbxjdnrp8zrn";
|
||||
repo = "veikk-linux-driver";
|
||||
tag = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-Nn90s22yrynYFYLSlBN4aRvdISPsxBFr21yiohs5r4Y=";
|
||||
};
|
||||
|
||||
patches = [ ./fix-6.12-build.patch ];
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
buildInputs = [ kernel ];
|
||||
@@ -26,16 +28,20 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/veikk
|
||||
install -Dm755 veikk.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/veikk
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
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 ];
|
||||
license = lib.licenses.gpl2Only;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ nicbk ];
|
||||
broken = kernel.kernelOlder "4.19";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
https://github.com/torvalds/linux/commit/5f60d5f6bbc12e782fac78110b0ee62698f3b576
|
||||
---
|
||||
veikk_vdev.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/veikk_vdev.c b/veikk_vdev.c
|
||||
index 9d0b49f..83e9efa 100644
|
||||
--- a/veikk_vdev.c
|
||||
+++ b/veikk_vdev.c
|
||||
@@ -6,7 +6,13 @@
|
||||
* - Set up the module parameters
|
||||
*/
|
||||
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
|
||||
#include <asm/unaligned.h>
|
||||
+#else
|
||||
+#include <linux/unaligned.h>
|
||||
+#endif
|
||||
#include <linux/module.h>
|
||||
#include "veikk.h"
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
Reference in New Issue
Block a user