From 0175bf648af397675472cf7be9478b22457cc685 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Wed, 14 Mar 2018 16:43:51 -0500 Subject: [PATCH 1/2] freenect: 0.5.5 -> 0.5.7 --- pkgs/development/libraries/freenect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/freenect/default.nix b/pkgs/development/libraries/freenect/default.nix index d6767a4cbd3..07a40bcecf2 100644 --- a/pkgs/development/libraries/freenect/default.nix +++ b/pkgs/development/libraries/freenect/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "freenect-${version}"; - version = "0.5.5"; + version = "0.5.7"; src = fetchFromGitHub { owner = "OpenKinect"; repo = "libfreenect"; rev = "v${version}"; - sha256 = "0qmbagfkxjgbwd2ajn7i5lkic9gx5y02bsnmqm7cjay99zfw9ifx"; + sha256 = "0vnc7z2avckh4mccqq6alsd2z7xvsh3kaslc5b0gnfxw0j269gl6"; }; buildInputs = [ libusb freeglut libGLU_combined libXi libXmu ]; From 4576ff80124b6b5c58bf964b963efa08ecacf6c9 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Wed, 14 Mar 2018 17:11:51 -0500 Subject: [PATCH 2/2] freenect: enable Darwin building --- pkgs/development/libraries/freenect/default.nix | 14 +++++++++----- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/freenect/default.nix b/pkgs/development/libraries/freenect/default.nix index 07a40bcecf2..3771880d360 100644 --- a/pkgs/development/libraries/freenect/default.nix +++ b/pkgs/development/libraries/freenect/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchFromGitHub, cmake, libusb, pkgconfig, freeglut, libGLU_combined, libXi, libXmu }: +{ stdenv, lib, fetchFromGitHub, cmake, libusb, pkgconfig, freeglut, libGLU_combined, libXi, libXmu +, GLUT, Cocoa + }: stdenv.mkDerivation rec { name = "freenect-${version}"; @@ -11,15 +13,17 @@ stdenv.mkDerivation rec { sha256 = "0vnc7z2avckh4mccqq6alsd2z7xvsh3kaslc5b0gnfxw0j269gl6"; }; - buildInputs = [ libusb freeglut libGLU_combined libXi libXmu ]; + buildInputs = [ libusb freeglut libGLU_combined libXi libXmu ] + ++ lib.optionals stdenv.isDarwin [ GLUT Cocoa ]; + nativeBuildInputs = [ cmake pkgconfig ]; meta = { description = "Drivers and libraries for the Xbox Kinect device on Windows, Linux, and macOS"; inherit version; homepage = http://openkinect.org; - license = with stdenv.lib.licenses; [ gpl2 asl20 ]; - maintainers = with stdenv.lib.maintainers; [ bennofs ]; - platforms = stdenv.lib.platforms.linux; + license = with lib.licenses; [ gpl2 asl20 ]; + maintainers = with lib.maintainers; [ bennofs ]; + platforms = with lib.platforms; linux ++ darwin ; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ac59bb2739..8e84a2658ae 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8807,7 +8807,9 @@ with pkgs; freeglut = callPackage ../development/libraries/freeglut { }; - freenect = callPackage ../development/libraries/freenect { }; + freenect = callPackage ../development/libraries/freenect { + inherit (darwin.apple_sdk.frameworks) Cocoa GLUT; + }; freetype = callPackage ../development/libraries/freetype { };