1 { lib, stdenv, fetchurl, cmake, freeglut, libGLU, libGL, glfw2, glew, libX11, xorgproto
2 , libXi, libXmu, fetchpatch, libXrandr
5 stdenv.mkDerivation rec {
8 version = "${majorVersion}.0.3";
11 url = "https://chipmunk-physics.net/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
12 sha256 = "06j9cfxsyrrnyvl7hsf55ac5mgff939mmijliampphlizyg0r2q4";
17 url = "https://github.com/slembcke/Chipmunk2D/commit/9a051e6fb970c7afe09ce2d564c163b81df050a8.patch";
18 sha256 = "0ps8bjba1k544vcdx5w0qk7gcjq94yfigxf67j50s63yf70k2n70";
22 nativeBuildInputs = [ cmake ];
24 [ freeglut libGLU libGL glfw2 glew libX11 xorgproto libXi libXmu libXrandr ];
28 cp demo/chipmunk_demos $out/bin
32 description = "A fast and lightweight 2D game physics library";
33 homepage = "http://chipmunk2d.net/";
34 license = licenses.mit;
35 platforms = platforms.unix; # supports Windows and MacOS as well, but those require more work