summary refs log tree commit diff
path: root/pkgs/misc/drivers/xwiimote/default.nix
blob: 8fafd1b6ebcce22a332777ce5ff68209a3f524e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ lib, stdenv, udev, ncurses, pkg-config, fetchurl, bluez }:

stdenv.mkDerivation rec {
  name = "xwiimote-2";
  src = fetchurl {
    url = "https://github.com/dvdhrm/xwiimote/releases/download/${name}/${name}.tar.xz";
    sha256 = "1g9cbhblll47l300zr999xr51x2g98y49l222f77fhswd12kjzhd";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ udev ncurses bluez ];

  configureFlags = [ "--with-doxygen=no" ];

  meta = {
    homepage = "http://dvdhrm.github.io/xwiimote";
    description = "Userspace utilities to control connected Nintendo Wii Remotes";
    platforms = lib.platforms.linux;
    license = lib.licenses.mit;
  };

  postInstallPhase = ''
    mkdir -p "$out/etc/X11/xorg.conf.d/"
    cp "res/50-xorg-fix-xwiimote.conf" "$out/etc/X11/xorg.conf.d/50-fix-xwiimote.conf"
  '';
}