2018-12-31 04:40:47 +01:00
|
|
|
{ stdenv, fetchurl, cmake, freeglut, libGLU_combined, glfw2, glew, libX11, xorgproto
|
|
|
|
, libXi, libXmu
|
2015-05-02 12:26:50 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "chipmunk-${version}";
|
|
|
|
majorVersion = "7";
|
2017-03-12 02:58:16 +01:00
|
|
|
version = "${majorVersion}.0.1";
|
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";
|
2017-03-12 02:58:16 +01:00
|
|
|
sha256 = "0q4jwv1icz8spcjkp0v3bnygi6hq2zmnsgcxkwm8i2bxfxjb8m7y";
|
2008-11-30 16:05:43 +01:00
|
|
|
};
|
|
|
|
|
2017-03-12 02:58:16 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2015-05-02 12:26:50 +02:00
|
|
|
buildInputs =
|
2018-12-31 04:40:47 +01:00
|
|
|
[ freeglut libGLU_combined glfw2 glew libX11 xorgproto 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
|
|
|
};
|
|
|
|
}
|