2024-06-05 15:53:02 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel }:
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "xone";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.3-unstable-2024-03-16";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "medusalix";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "xone";
|
|
|
|
rev = "948d2302acdd6333295eaba4da06d96677290ad3";
|
|
|
|
hash = "sha256-srAEw1ai5KT0rmVUL3Dut9R2mNb00AAZVCcINikh2sM=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
export sourceRoot=$(pwd)/${finalAttrs.src.name}
|
2022-03-05 16:20:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"-C"
|
|
|
|
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"M=$(sourceRoot)"
|
2024-04-21 15:54:59 +00:00
|
|
|
"VERSION=${finalAttrs.version}"
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildFlags = [ "modules" ];
|
|
|
|
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
|
|
|
|
installTargets = [ "modules_install" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Linux kernel driver for Xbox One and Xbox Series X|S accessories";
|
|
|
|
homepage = "https://github.com/medusalix/xone";
|
2024-06-24 18:47:55 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-03-05 16:20:37 +00:00
|
|
|
maintainers = with lib.maintainers; [ rhysmdnz ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
2024-04-21 15:54:59 +00:00
|
|
|
)
|