depot/third_party/nixpkgs/pkgs/os-specific/linux/hid-nintendo/default.nix
Default email 8a45d4525b Project import generated by Copybara.
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
2022-03-30 11:31:56 +02:00

38 lines
984 B
Nix

{ lib, stdenv, fetchFromGitHub, kernel }:
stdenv.mkDerivation rec {
pname = "hid-nintendo";
version = "3.2";
src = fetchFromGitHub {
owner = "nicman23";
repo = "dkms-hid-nintendo";
rev = version;
sha256 = "1c262xarslicn9ildndl66sf97i5pzwzra54zh2rp11j7kkvvbyr";
};
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 = with lib; {
description = "A Nintendo HID kernel module";
homepage = "https://github.com/nicman23/dkms-hid-nintendo";
license = licenses.gpl2Plus;
maintainers = [ maintainers.rencire ];
platforms = platforms.linux;
broken = versionOlder kernel.version "4.14";
};
}