about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/wiiuse/default.nix
blob: d5d34fb618d68c956682ec91e46e9c7ef59827c7 (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
{ lib
, stdenv
, fetchFromGitHub
, cmake
, bluez
, libobjc
, Foundation
, IOBluetooth
}:
stdenv.mkDerivation rec {

  pname = "WiiUse";
  version = "0.15.5";

  src = fetchFromGitHub {
    owner = "wiiuse";
    repo = "wiiuse";
    rev = version;
    sha256 = "05gc3s0wxx7ga4g32yyibyxdh46rm9bbslblrc72ynrjxq98sg13";
  };

  nativeBuildInputs = [ cmake ];

  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ bluez ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc Foundation IOBluetooth ];

  propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ bluez ];

  cmakeFlags = [ "-DBUILD_EXAMPLE_SDL=OFF" ];

  meta = with lib; {
    description = "Feature complete cross-platform Wii Remote access library";
    license = licenses.gpl3Plus;
    homepage = "https://github.com/wiiuse/wiiuse";
    maintainers = with maintainers; [ shamilton ];
    platforms = with platforms; unix;
  };
}