2010-12-17 14:02:17 +01:00
|
|
|
x@{builderDefsPackage
|
|
|
|
, unzip, cmake, mesa, freeglut, libX11, xproto
|
2014-07-01 11:58:11 +02:00
|
|
|
, inputproto, libXi, fetchsvn, pkgconfig
|
2010-12-17 14:02:17 +01:00
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
|
|
|
(a :
|
|
|
|
let
|
|
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
|
|
[];
|
|
|
|
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
|
|
in
|
|
|
|
rec {
|
2014-07-01 11:58:11 +02:00
|
|
|
version = "2.3.0";
|
|
|
|
name = "box2d-${version}";
|
|
|
|
srcDrv = a.fetchsvn {
|
|
|
|
url = "http://box2d.googlecode.com/svn/trunk";
|
|
|
|
rev = "277";
|
|
|
|
sha256 = "1xp93yw2zcqhmh999v7cwqaqxq1glgyg5r8kfm4yabc1ypba3in4";
|
2010-12-17 14:02:17 +01:00
|
|
|
};
|
2014-07-01 11:58:11 +02:00
|
|
|
src = srcDrv + "/";
|
2010-12-17 14:02:17 +01:00
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
|
2010-12-17 16:40:34 +01:00
|
|
|
phaseNames = ["changeSettings" "doCmake" "doMakeInstall"];
|
2010-12-17 14:02:17 +01:00
|
|
|
|
2010-12-17 16:40:34 +01:00
|
|
|
changeSettings = a.fullDepEntry ''
|
|
|
|
sed -i Box2D/Common/b2Settings.h -e 's@b2_maxPolygonVertices .*@b2_maxPolygonVertices 15@'
|
|
|
|
'' ["minInit" "addInputs" "doUnpack"];
|
|
|
|
|
2010-12-17 14:02:17 +01:00
|
|
|
goSrcDir = ''cd Box2D'';
|
|
|
|
|
|
|
|
doCmake = a.fullDepEntry ''
|
|
|
|
cd Build;
|
|
|
|
cmake -DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON -DCMAKE_INSTALL_PREFIX=$out ..
|
|
|
|
'' ["minInit" "addInputs" "doUnpack"];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "2D physics engine";
|
|
|
|
maintainers = with a.lib.maintainers;
|
|
|
|
[
|
|
|
|
raskin
|
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux;
|
|
|
|
license = "bsd";
|
2014-07-01 11:58:11 +02:00
|
|
|
inherit version;
|
2010-12-17 14:02:17 +01:00
|
|
|
};
|
|
|
|
}) x
|
|
|
|
|