Merge pull request #46422 from LnL7/darwin-bullet
bullet: fix darwin build
This commit is contained in:
commit
189b861638
@ -1,4 +1,6 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, libGLU_combined, freeglut, darwin }:
|
||||
{ stdenv, fetchFromGitHub, cmake, libGLU_combined, freeglut
|
||||
, Cocoa, OpenGL
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "bullet-${version}";
|
||||
@ -11,10 +13,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1msp7w3563vb43w70myjmqsdb97kna54dcfa7yvi9l3bvamb92w3";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake ] ++
|
||||
(if stdenv.isDarwin
|
||||
then with darwin.apple_sdk.frameworks; [ Cocoa OpenGL ]
|
||||
else [libGLU_combined freeglut]);
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = stdenv.lib.optionals stdenv.isLinux [ libGLU_combined freeglut ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
|
||||
|
||||
patches = [ ./gwen-narrowing.patch ];
|
||||
|
||||
@ -28,25 +29,26 @@ stdenv.mkDerivation rec {
|
||||
"-DBUILD_CPU_DEMOS=OFF"
|
||||
"-DINSTALL_EXTRA_LIBS=ON"
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
"-DMACOSX_DEPLOYMENT_TARGET=\"10.9\""
|
||||
"-DOPENGL_FOUND=true"
|
||||
"-DOPENGL_LIBRARIES=${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DOPENGL_INCLUDE_DIR=${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DOPENGL_gl_LIBRARY=${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DCOCOA_LIBRARY=${darwin.apple_sdk.frameworks.Cocoa}/Library/Frameworks/Cocoa.framework"
|
||||
"-DOPENGL_LIBRARIES=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DOPENGL_gl_LIBRARY=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DCOCOA_LIBRARY=${Cocoa}/Library/Frameworks/Cocoa.framework"
|
||||
"-DBUILD_BULLET2_DEMOS=OFF"
|
||||
"-DBUILD_UNIT_TESTS=OFF"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "A professional free 3D Game Multiphysics Library";
|
||||
longDescription = ''
|
||||
Bullet 3D Game Multiphysics Library provides state of the art collision
|
||||
detection, soft body and rigid body dynamics.
|
||||
'';
|
||||
homepage = http://bulletphysics.org;
|
||||
license = stdenv.lib.licenses.zlib;
|
||||
maintainers = with stdenv.lib.maintainers; [ aforemny ];
|
||||
platforms = with stdenv.lib.platforms; unix;
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ aforemny ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -22225,7 +22225,9 @@ with pkgs;
|
||||
inherit (gnome2) gtksourceview;
|
||||
};
|
||||
|
||||
bullet = callPackage ../development/libraries/bullet {};
|
||||
bullet = callPackage ../development/libraries/bullet {
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;
|
||||
};
|
||||
|
||||
inherit (callPackages ../development/libraries/spdlog { })
|
||||
spdlog_0 spdlog_1;
|
||||
|
Loading…
Reference in New Issue
Block a user