From 1a10a377ec3ca74cb3029a3f8fd14b28591e23b9 Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Thu, 6 Oct 2016 02:01:46 -0400 Subject: [PATCH] pcl: fix problem finding OpenGL on darwin --- pkgs/development/libraries/pcl/default.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/pcl/default.nix b/pkgs/development/libraries/pcl/default.nix index 42a8d00eec01..b9762e284e68 100644 --- a/pkgs/development/libraries/pcl/default.nix +++ b/pkgs/development/libraries/pcl/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, cmake, qhull, flann, boost, vtk, eigen, pkgconfig, qt4 -, libusb1, libpcap, libXt, libpng, Cocoa, AGL, cf-private +, libusb1, libpcap, libXt, libpng, Cocoa, AGL, cf-private, OpenGL }: stdenv.mkDerivation rec { @@ -18,7 +18,9 @@ stdenv.mkDerivation rec { libpng vtk qt4 libXt ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa AGL cf-private ]; cmakeFlags = stdenv.lib.optionals stdenv.isDarwin [ - "-DCMAKE_OSX_SYSROOT=" "-DCMAKE_OSX_DEPLOYMENT_TARGET=" ]; + "-DCMAKE_OSX_SYSROOT=" "-DCMAKE_OSX_DEPLOYMENT_TARGET=" + "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" + ]; preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' NIX_CFLAGS_COMPILE=$(echo "$NIX_CFLAGS_COMPILE" | sed "s,[[:space:]]*-F$NIX_STORE/[[:alnum:]]*-CF-osx-[[:digit:].]*/Library/Frameworks,,g") diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85e1336deb45..874f78fa0235 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8616,7 +8616,7 @@ in pcl = callPackage ../development/libraries/pcl { vtk = vtkWithQt4; inherit (darwin) cf-private; - inherit (darwin.apple_sdk.frameworks) Cocoa AGL; + inherit (darwin.apple_sdk.frameworks) Cocoa AGL OpenGL; }; pcre = callPackage ../development/libraries/pcre { };