2023-04-01 02:49:36 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kernel
|
|
|
|
}:
|
2020-12-27 03:59:35 +00:00
|
|
|
|
2023-04-01 02:49:36 +00:00
|
|
|
stdenv.mkDerivation (self: {
|
2020-12-27 03:59:35 +00:00
|
|
|
pname = "hid-nintendo";
|
2021-08-30 13:28:33 +00:00
|
|
|
version = "3.2";
|
2020-12-27 03:59:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nicman23";
|
|
|
|
repo = "dkms-hid-nintendo";
|
2023-04-01 02:49:36 +00:00
|
|
|
rev = self.version;
|
|
|
|
hash = "sha256-2a+95zwyhJsF/KSo/Pm/JZ7ktDG02UZjsixSnVUXRrA=";
|
2020-12-27 03:59:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
|
|
|
export sourceRoot=$(pwd)/source/src
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2022-02-10 02:01:36 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2020-12-27 03:59:35 +00:00
|
|
|
"-C"
|
|
|
|
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"M=$(sourceRoot)"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildFlags = [ "modules" ];
|
|
|
|
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
|
|
|
|
installTargets = [ "modules_install" ];
|
|
|
|
|
2023-04-01 02:49:36 +00:00
|
|
|
meta = {
|
2020-12-27 03:59:35 +00:00
|
|
|
homepage = "https://github.com/nicman23/dkms-hid-nintendo";
|
2023-04-01 02:49:36 +00:00
|
|
|
description = "A Nintendo HID kernel module";
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = [ ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
broken = lib.versionOlder kernel.version "4.14";
|
2020-12-27 03:59:35 +00:00
|
|
|
};
|
2023-04-01 02:49:36 +00:00
|
|
|
})
|