git.iko.soy/typeable/nixpkgs
on master help sign in
xow: 0.2 -> 0.4
commit081ed8f0126178a0d2c624fd4bd946704db7fc6a authorJan Solanti <jhs@psonet.com> dateMon 30 Mar 2020, 04:05 (7 years ago) parent35035a5
3 files changed+17−29
nixos/modules/hardware/uinput.nix+1−1 nixos/modules/services/hardware/xow.nix+3−16 pkgs/misc/drivers/xow/default.nix+13−12
nixos/modules/hardware/uinput.nix+1−1
@@ -4,7 +4,7 @@ let
44 cfg = config.hardware.uinput;
55in {
66 options.hardware.uinput = {
7− enable = lib.mkEnableOption "Whether to enable uinput support";
7+ enable = lib.mkEnableOption "uinput support";
88 };
99
1010 config = lib.mkIf cfg.enable {
nixos/modules/services/hardware/xow.nix+3−16
@@ -4,27 +4,14 @@ let
44 cfg = config.services.hardware.xow;
55in {
66 options.services.hardware.xow = {
7− enable = lib.mkEnableOption "Whether to enable xow or not.";
7+ enable = lib.mkEnableOption "xow as a systemd service";
88 };
99
1010 config = lib.mkIf cfg.enable {
1111 hardware.uinput.enable = true;
1212
13− users.users.xow = {
14− group = "uinput";
15− isSystemUser = true;
16− };
13+ systemd.packages = [ pkgs.xow ];
1714
18− systemd.services.xow = {
19− wantedBy = [ "multi-user.target" ];
20− description = "Xbox One Wireless Dongle Driver";
21− after = [ "systemd-udev-settle.service" ];
22− serviceConfig = {
23− ExecStart = ''
24− ${pkgs.xow}/bin/xow
25− '';
26− User = "xow";
27− };
28− };
15+ services.udev.packages = [ pkgs.xow ];
2916 };
3017}
pkgs/misc/drivers/xow/default.nix+13−12
@@ -1,32 +1,33 @@
1−{ stdenv, fetchFromGitHub, libusb, gitMinimal }:
1+{ stdenv, fetchFromGitHub, libusb }:
22
33stdenv.mkDerivation rec {
44 pname = "xow";
5− version = "0.2";
5+ version = "0.4";
66
77 src = fetchFromGitHub {
88 owner = "medusalix";
99 repo = "xow";
1010 rev = "v${version}";
11− sha256 = "03ajal91xi52svzy621aa4jcdf0vj4pqd52kljam0wryrlmcpbr3";
11+ sha256 = "1xkwcx2gqip9v2h3zjmrn7sgcck3midl5alhsmr3zivgdipamynv";
1212 };
1313
14− makeFlags = [ "BUILD=RELEASE" "VERSION=${version}" ];
14+ makeFlags = [
15+ "BUILD=RELEASE"
16+ "VERSION=${version}"
17+ "BINDIR=${placeholder ''out''}/bin"
18+ "UDEVDIR=${placeholder ''out''}/lib/udev/rules.d"
19+ "MODLDIR=${placeholder ''out''}/lib/modules-load.d"
20+ "MODPDIR=${placeholder ''out''}/lib/modprobe.d"
21+ "SYSDDIR=${placeholder ''out''}/lib/systemd/system"
22+ ];
1523 enableParallelBuilding = true;
1624 buildInputs = [ libusb ];
1725
18− installPhase = ''
19− runHook preInstall
20− mkdir -p $out/bin
21− cp xow $out/bin
22− runHook postInstall
23− '';
24−
2526 meta = with stdenv.lib; {
2627 homepage = "https://github.com/medusalix/xow";
2728 description = "Linux driver for the Xbox One wireless dongle";
2829 license = licenses.gpl2Plus;
29− maintainers = [ maintainers.pmiddend ];
30+ maintainers = [ maintainers.jansol ];
3031 platforms = platforms.linux;
3132 };
3233}