1{ stdenv, lib, fetchFromGitHub, cmake, libusb, pkgconfig, freeglut, libGLU_combined, libXi, libXmu
2, GLUT, Cocoa
3 }:
4
5stdenv.mkDerivation rec {
6 name = "freenect-${version}";
7 version = "0.5.7";
8
9 src = fetchFromGitHub {
10 owner = "OpenKinect";
11 repo = "libfreenect";
12 rev = "v${version}";
13 sha256 = "0vnc7z2avckh4mccqq6alsd2z7xvsh3kaslc5b0gnfxw0j269gl6";
14 };
15
16 buildInputs = [ libusb freeglut libGLU_combined libXi libXmu ]
17 ++ lib.optionals stdenv.isDarwin [ GLUT Cocoa ];
18
19 nativeBuildInputs = [ cmake pkgconfig ];
20
21 meta = {
22 description = "Drivers and libraries for the Xbox Kinect device on Windows, Linux, and macOS";
23 inherit version;
24 homepage = http://openkinect.org;
25 license = with lib.licenses; [ gpl2 asl20 ];
26 maintainers = with lib.maintainers; [ bennofs ];
27 platforms = with lib.platforms; linux ++ darwin ;
28 };
29}