2019-11-10 16:44:34 +00:00
|
|
|
{ stdenv, fetchurl, cmake, freeglut, libGLU, libGL, glfw2, glew, libX11, xorgproto
|
2018-12-31 03:40:47 +00:00
|
|
|
, libXi, libXmu
|
2015-05-02 10:26:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "chipmunk";
|
2015-05-02 10:26:50 +00:00
|
|
|
majorVersion = "7";
|
2017-03-12 01:58:16 +00:00
|
|
|
version = "${majorVersion}.0.1";
|
2008-11-30 15:05:43 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-05-02 10:26:50 +00:00
|
|
|
url = "https://chipmunk-physics.net/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
|
2017-03-12 01:58:16 +00:00
|
|
|
sha256 = "0q4jwv1icz8spcjkp0v3bnygi6hq2zmnsgcxkwm8i2bxfxjb8m7y";
|
2008-11-30 15:05:43 +00:00
|
|
|
};
|
|
|
|
|
2017-03-12 01:58:16 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2015-05-02 10:26:50 +00:00
|
|
|
buildInputs =
|
2019-11-10 16:44:34 +00:00
|
|
|
[ freeglut libGLU libGL glfw2 glew libX11 xorgproto libXi libXmu ];
|
2008-11-30 15:05:43 +00:00
|
|
|
|
2015-05-02 10:26:50 +00:00
|
|
|
postInstall = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2015-05-02 10:26:50 +00:00
|
|
|
cp demo/chipmunk_demos $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A fast and lightweight 2D game physics library";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://chipmunk2d.net/";
|
2015-05-02 10:26:50 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix; # supports Windows and MacOS as well, but those require more work
|
2008-11-30 15:05:43 +00:00
|
|
|
};
|
|
|
|
}
|