Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 libGLU, 7 libGL, 8 libglut, 9}: 10 11stdenv.mkDerivation { 12 pname = "bullet"; 13 version = "2019-03-27"; 14 15 src = fetchFromGitHub { 16 owner = "olegklimov"; 17 repo = "bullet3"; 18 # roboschool needs the HEAD of a specific branch of this fork, see 19 # https://github.com/openai/roboschool/issues/126#issuecomment-421643980 20 # https://github.com/openai/roboschool/pull/62 21 # https://github.com/openai/roboschool/issues/124 22 rev = "3687507ddc04a15de2c5db1e349ada3f2b34b3d6"; 23 sha256 = "1wd7vj9136dl7lfb8ll0rc2fdl723y3ls9ipp7657yfl2xrqhvkb"; 24 }; 25 26 nativeBuildInputs = [ cmake ]; 27 buildInputs = [ 28 libGLU 29 libGL 30 libglut 31 ]; 32 33 patches = [ ./gwen-narrowing.patch ]; 34 35 cmakeFlags = [ 36 "-DBUILD_SHARED_LIBS=ON" 37 "-DBUILD_CPU_DEMOS=OFF" 38 "-DINSTALL_EXTRA_LIBS=ON" 39 ] 40 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 41 "-DBUILD_BULLET2_DEMOS=OFF" 42 "-DBUILD_UNIT_TESTS=OFF" 43 ]; 44 45 meta = with lib; { 46 description = "Professional free 3D Game Multiphysics Library"; 47 longDescription = '' 48 Bullet 3D Game Multiphysics Library provides state of the art collision 49 detection, soft body and rigid body dynamics. 50 ''; 51 homepage = "http://bulletphysics.org"; 52 license = licenses.zlib; 53 platforms = platforms.unix; 54 # /tmp/nix-build-bullet-2019-03-27.drv-0/source/src/Bullet3Common/b3Vector3.h:297:7: error: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range] 55 # y = b3_splat_ps(y, 0x80); 56 broken = (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64); 57 }; 58}