2022-10-06 18:32:54 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kernel
|
|
|
|
, bluez
|
|
|
|
, nixosTests
|
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "xpadneo";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "0.9.5";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "atar-axis";
|
2022-10-06 18:32:54 +00:00
|
|
|
repo = "xpadneo";
|
|
|
|
rev = "refs/tags/v${finalAttrs.version}";
|
|
|
|
sha256 = "sha256-rT2Mq40fE055FemDG7PBjt+cxgIHJG9tTjtw2nW6B98=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
export sourceRoot=$(pwd)/${finalAttrs.src.name}/hid-xpadneo/src
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
buildInputs = [ bluez ];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2020-08-20 17:08:02 +00:00
|
|
|
"-C"
|
|
|
|
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"M=$(sourceRoot)"
|
2022-10-06 18:32:54 +00:00
|
|
|
"VERSION=${finalAttrs.version}"
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildFlags = [ "modules" ];
|
|
|
|
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
|
|
|
|
installTargets = [ "modules_install" ];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
passthru.tests = {
|
|
|
|
xpadneo = nixosTests.xpadneo;
|
|
|
|
};
|
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Advanced Linux driver for Xbox One wireless controllers";
|
|
|
|
homepage = "https://atar-axis.github.io/xpadneo";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = licenses.gpl3Only;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2022-10-06 18:32:54 +00:00
|
|
|
})
|