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

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

40 lines
972 B
Nix
Raw Normal View History

2022-02-19 22:14:59 +00:00
{ stdenv, lib, fetchFromGitHub, kernel, fetchurl }:
stdenv.mkDerivation rec {
2022-08-07 03:32:33 +00:00
pname = "xone";
version = "0.3";
2022-02-19 22:14:59 +00:00
src = fetchFromGitHub {
owner = "medusalix";
2022-08-07 03:32:33 +00:00
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-h+j4xCV9R6hp9trsv1NByh9m0UBafOz42ZuYUjclILE=";
2022-02-19 22:14:59 +00:00
};
setSourceRoot = ''
export sourceRoot=$(pwd)/source
'';
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = [
"-C"
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"M=$(sourceRoot)"
"VERSION=${version}"
];
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";
license = licenses.gpl2;
maintainers = with lib.maintainers; [ rhysmdnz ];
platforms = platforms.linux;
};
}