2015-05-02 12:26:50 +02:00
|
|
|
{ stdenv, fetchurl, cmake, freeglut, mesa, glfw2, glew, libX11, xproto
|
|
|
|
, inputproto, libXi, libXmu
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "chipmunk-${version}";
|
|
|
|
majorVersion = "7";
|
|
|
|
version = "${majorVersion}.0.0";
|
2008-11-30 16:05:43 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-05-02 12:26:50 +02:00
|
|
|
url = "https://chipmunk-physics.net/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
|
|
|
|
sha256 = "1kaii8wgvp0kgn2p22jm9smyqlws4p5dg8j23jaiasx9jq1kiaql";
|
2008-11-30 16:05:43 +01:00
|
|
|
};
|
|
|
|
|
2015-05-02 12:26:50 +02:00
|
|
|
buildInputs =
|
|
|
|
[ cmake freeglut mesa glfw2 glew libX11 xproto inputproto libXi libXmu ];
|
2008-11-30 16:05:43 +01:00
|
|
|
|
2015-05-02 12:26:50 +02:00
|
|
|
postInstall = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2015-05-02 12:26:50 +02:00
|
|
|
cp demo/chipmunk_demos $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A fast and lightweight 2D game physics library";
|
|
|
|
homepage = http://chipmunk2d.net/;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix; # supports Windows and MacOS as well, but those require more work
|
2008-11-30 16:05:43 +01:00
|
|
|
};
|
|
|
|
}
|