nixpkgs/pkgs/os-specific/linux/xpadneo/default.nix

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

50 lines
1.1 KiB
Nix
Raw Normal View History

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