diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-04-14 17:50:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-04-14 17:50:16 +0000 |
commit | 439ebf093f2779d73bc76484a36be2889cc807bf (patch) | |
tree | 7dd3b84fb345c228165c2dae6c7cdd54b433db9e /nixpkgs/pkgs/development/libraries/bullet | |
parent | d7417c2c1096b13fe903af802c7cf019fca14a7b (diff) | |
parent | 0c0954781e257b8b0dc49341795a2fe7d96945a3 (diff) | |
download | nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.gz nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.bz2 nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.lz nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.xz nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.zst nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.zip |
Merge commit '0c0954781e257b8b0dc49341795a2fe7d96945a3'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/bullet')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/bullet/roboschool-fork.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/bullet/roboschool-fork.nix b/nixpkgs/pkgs/development/libraries/bullet/roboschool-fork.nix new file mode 100644 index 000000000000..12fc1834e905 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/bullet/roboschool-fork.nix @@ -0,0 +1,57 @@ +{ stdenv, fetchFromGitHub, cmake, libGLU_combined, freeglut +, Cocoa, OpenGL +}: + +stdenv.mkDerivation rec { + name = "bullet-${version}"; + version = "2019-03-27"; + + src = fetchFromGitHub { + owner = "olegklimov"; + repo = "bullet3"; + # roboschool needs the HEAD of a specific branch of this fork, see + # https://github.com/openai/roboschool/issues/126#issuecomment-421643980 + # https://github.com/openai/roboschool/pull/62 + # https://github.com/openai/roboschool/issues/124 + rev = "3687507ddc04a15de2c5db1e349ada3f2b34b3d6"; + sha256 = "1wd7vj9136dl7lfb8ll0rc2fdl723y3ls9ipp7657yfl2xrqhvkb"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = stdenv.lib.optionals stdenv.isLinux [ libGLU_combined freeglut ] + ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa OpenGL ]; + + patches = [ ./gwen-narrowing.patch ]; + + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i 's/FIND_PACKAGE(OpenGL)//' CMakeLists.txt + sed -i 's/FIND_LIBRARY(COCOA_LIBRARY Cocoa)//' CMakeLists.txt + ''; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + "-DBUILD_CPU_DEMOS=OFF" + "-DINSTALL_EXTRA_LIBS=ON" + ] ++ stdenv.lib.optionals stdenv.isDarwin [ + "-DOPENGL_FOUND=true" + "-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 = 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 = licenses.zlib; + platforms = platforms.unix; + }; +} |