87f9c27ba9
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
42 lines
975 B
Nix
42 lines
975 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, kernel
|
|
}:
|
|
|
|
stdenv.mkDerivation (self: {
|
|
pname = "hid-nintendo";
|
|
version = "3.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nicman23";
|
|
repo = "dkms-hid-nintendo";
|
|
rev = self.version;
|
|
hash = "sha256-2a+95zwyhJsF/KSo/Pm/JZ7ktDG02UZjsixSnVUXRrA=";
|
|
};
|
|
|
|
setSourceRoot = ''
|
|
export sourceRoot=$(pwd)/source/src
|
|
'';
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = kernel.makeFlags ++ [
|
|
"-C"
|
|
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
"M=$(sourceRoot)"
|
|
];
|
|
|
|
buildFlags = [ "modules" ];
|
|
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
|
|
installTargets = [ "modules_install" ];
|
|
|
|
meta = {
|
|
homepage = "https://github.com/nicman23/dkms-hid-nintendo";
|
|
description = "A Nintendo HID kernel module";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = [ ];
|
|
platforms = lib.platforms.linux;
|
|
broken = lib.versionOlder kernel.version "4.14";
|
|
};
|
|
})
|