Merge pull request #145385 from marius851000/bullet317

bullet: 2.87 -> 3.17
This commit is contained in:
Thiago Kenji Okada 2021-11-14 13:51:57 -03:00 committed by GitHub
commit 991b66a5bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,22 +4,23 @@
stdenv.mkDerivation rec {
pname = "bullet";
version = "2.87";
version = "3.17";
src = fetchFromGitHub {
owner = "bulletphysics";
repo = "bullet3";
rev = version;
sha256 = "1msp7w3563vb43w70myjmqsdb97kna54dcfa7yvi9l3bvamb92w3";
sha256 = "sha256-uQ4X8F8nmagbcFh0KexrmnhHIXFSB3A1CCnjPVeHL3Q=";
};
nativeBuildInputs = [ cmake ];
buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL freeglut ]
++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
patches = [ ./gwen-narrowing.patch ];
postPatch = lib.optionalString stdenv.isDarwin ''
postPatch = ''
substituteInPlace examples/ThirdPartyLibs/Gwen/CMakeLists.txt \
--replace "-DGLEW_STATIC" "-DGLEW_STATIC -Wno-narrowing"
'' + lib.optionalString stdenv.isDarwin ''
sed -i 's/FIND_PACKAGE(OpenGL)//' CMakeLists.txt
sed -i 's/FIND_LIBRARY(COCOA_LIBRARY Cocoa)//' CMakeLists.txt
'';