Made OpenGL a propagated dependency for mesa on darwin (fixes a host of building errors, especially in haskell pacakges). Also fixed freeglut on darwin.

Signed-off-by: Pamelloes <pamelloes@gmail.com>
This commit is contained in:
Pamelloes 2016-02-15 14:31:24 -06:00
parent d9739ebcc2
commit 8d278b47c1
2 changed files with 10 additions and 0 deletions

View File

@ -11,6 +11,14 @@ in stdenv.mkDerivation {
buildInputs = [ libXi libXrandr libXxf86vm mesa xlibsWrapper cmake ];
cmakeFlags = stdenv.lib.optionals stdenv.isDarwin [
"-DOPENGL_INCLUDE_DIR=${mesa}/include"
"-DOPENGL_gl_LIBRARY:FILEPATH=${mesa}/lib/libGL.dylib"
"-DOPENGL_glu_LIBRARY:FILEPATH=${mesa}/lib/libGLU.dylib"
"-DFREEGLUT_BUILD_DEMOS:BOOL=OFF"
"-DFREEGLUT_BUILD_STATIC:BOOL=OFF"
];
meta = with stdenv.lib; {
description = "Create and manage windows containing OpenGL contexts";
longDescription = ''

View File

@ -25,6 +25,8 @@ let
libffi libvdpau
] ++ stdenv.lib.optionals stdenv.isDarwin [ OpenGL apple_sdk.sdk Xplugin ];
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ OpenGL ];
postUnpack = ''
ln -s darwin $sourceRoot/configs/current
'';