nixpkgs/pkgs/os-specific/linux/hid-nintendo/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
975 B
Nix
Raw Normal View History

2023-04-01 02:49:36 +00:00
{ lib
, stdenv
, fetchFromGitHub
, kernel
}:
2023-04-01 02:49:36 +00:00
stdenv.mkDerivation (self: {
pname = "hid-nintendo";
version = "3.2";
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=";
};
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" ];
2023-04-01 02:49:36 +00:00
meta = {
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";
};
2023-04-01 02:49:36 +00:00
})