xow: 0.2 -> 0.4
This commit is contained in:
parent
35035a543c
commit
081ed8f012
@ -4,7 +4,7 @@ let
|
|||||||
cfg = config.hardware.uinput;
|
cfg = config.hardware.uinput;
|
||||||
in {
|
in {
|
||||||
options.hardware.uinput = {
|
options.hardware.uinput = {
|
||||||
enable = lib.mkEnableOption "Whether to enable uinput support";
|
enable = lib.mkEnableOption "uinput support";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
@ -4,27 +4,14 @@ let
|
|||||||
cfg = config.services.hardware.xow;
|
cfg = config.services.hardware.xow;
|
||||||
in {
|
in {
|
||||||
options.services.hardware.xow = {
|
options.services.hardware.xow = {
|
||||||
enable = lib.mkEnableOption "Whether to enable xow or not.";
|
enable = lib.mkEnableOption "xow as a systemd service";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
hardware.uinput.enable = true;
|
hardware.uinput.enable = true;
|
||||||
|
|
||||||
users.users.xow = {
|
systemd.packages = [ pkgs.xow ];
|
||||||
group = "uinput";
|
|
||||||
isSystemUser = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.xow = {
|
services.udev.packages = [ pkgs.xow ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
description = "Xbox One Wireless Dongle Driver";
|
|
||||||
after = [ "systemd-udev-settle.service" ];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = ''
|
|
||||||
${pkgs.xow}/bin/xow
|
|
||||||
'';
|
|
||||||
User = "xow";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,33 @@
|
|||||||
{ stdenv, fetchFromGitHub, libusb, gitMinimal }:
|
{ stdenv, fetchFromGitHub, libusb }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "xow";
|
pname = "xow";
|
||||||
version = "0.2";
|
version = "0.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "medusalix";
|
owner = "medusalix";
|
||||||
repo = "xow";
|
repo = "xow";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "03ajal91xi52svzy621aa4jcdf0vj4pqd52kljam0wryrlmcpbr3";
|
sha256 = "1xkwcx2gqip9v2h3zjmrn7sgcck3midl5alhsmr3zivgdipamynv";
|
||||||
};
|
};
|
||||||
|
|
||||||
makeFlags = [ "BUILD=RELEASE" "VERSION=${version}" ];
|
makeFlags = [
|
||||||
|
"BUILD=RELEASE"
|
||||||
|
"VERSION=${version}"
|
||||||
|
"BINDIR=${placeholder ''out''}/bin"
|
||||||
|
"UDEVDIR=${placeholder ''out''}/lib/udev/rules.d"
|
||||||
|
"MODLDIR=${placeholder ''out''}/lib/modules-load.d"
|
||||||
|
"MODPDIR=${placeholder ''out''}/lib/modprobe.d"
|
||||||
|
"SYSDDIR=${placeholder ''out''}/lib/systemd/system"
|
||||||
|
];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
buildInputs = [ libusb ];
|
buildInputs = [ libusb ];
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp xow $out/bin
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/medusalix/xow";
|
homepage = "https://github.com/medusalix/xow";
|
||||||
description = "Linux driver for the Xbox One wireless dongle";
|
description = "Linux driver for the Xbox One wireless dongle";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ maintainers.pmiddend ];
|
maintainers = [ maintainers.jansol ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user