glew{,110}: don't depend on mesa on darwin

This commit is contained in:
Dmitry Kalinkin 2020-12-17 16:53:35 -05:00
parent 823bc77463
commit 5ba4eb2d2e
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333
3 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi
, AGL ? null
, AGL, OpenGL
}:
with stdenv.lib;
@ -12,9 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r";
};
buildInputs = [ xlibsWrapper libXmu libXi ]
++ optionals stdenv.isDarwin [ AGL ];
propagatedBuildInputs = [ libGLU ]; # GL/glew.h includes GL/glu.h
buildInputs = if stdenv.isDarwin then [ AGL ] else [ xlibsWrapper libXmu libXi ];
propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h
patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi
, OpenGL
}:
with stdenv.lib;
@ -13,8 +14,8 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "out" "dev" "doc" ];
buildInputs = [ xlibsWrapper libXmu libXi ];
propagatedBuildInputs = [ libGLU ]; # GL/glew.h includes GL/glu.h
buildInputs = optionals (!stdenv.isDarwin) [ xlibsWrapper libXmu libXi ];
propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h
patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux

View File

@ -13060,9 +13060,11 @@ in
gle = callPackage ../development/libraries/gle { };
glew = callPackage ../development/libraries/glew { };
glew = callPackage ../development/libraries/glew {
inherit (darwin.apple_sdk.frameworks) OpenGL;
};
glew110 = callPackage ../development/libraries/glew/1.10.nix {
inherit (darwin.apple_sdk.frameworks) AGL;
inherit (darwin.apple_sdk.frameworks) AGL OpenGL;
};
glfw = glfw3;