nixpkgs/pkgs/os-specific/linux/hid-nintendo/default.nix
2023-04-02 19:05:34 -03:00

43 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";
};
})