about summary refs log tree commit diff
path: root/pkgs/by-name/xw/xwiimote/package.nix
blob: a17299197d27aee38dc801dd42478378a3f620df (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
  lib,
  stdenv,
  udev,
  ncurses,
  pkg-config,
  fetchFromGitHub,
  bluez,
  autoreconfHook,
}:

stdenv.mkDerivation {
  pname = "xwiimote";
  version = "2-unstable-2024-02-29";

  src = fetchFromGitHub {
    owner = "xwiimote";
    repo = "xwiimote";
    rev = "4df713d9037d814cc0c64197f69e5c78d55caaf1";
    hash = "sha256-y68bi62H7ErVekcs0RZUXPpW+QJ97sTQP4lajB9PsgU=";
  };

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

  buildInputs = [
    udev
    ncurses
  ];

  nativeBuildInputs = [
    pkg-config
    autoreconfHook
  ];

  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"
  '';

  meta = {
    homepage = "https://xwiimote.github.io/xwiimote/";
    description = "Userspace utilities to control connected Nintendo Wii Remotes";
    mainProgram = "xwiishow";
    platforms = lib.platforms.linux;
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
}