2008-11-30 15:05:43 +00:00
|
|
|
args :
|
|
|
|
let
|
|
|
|
lib = args.lib;
|
|
|
|
fetchurl = args.fetchurl;
|
2009-05-20 00:25:58 +01:00
|
|
|
fullDepEntry = args.fullDepEntry;
|
2008-11-30 15:05:43 +00:00
|
|
|
|
2009-05-24 11:57:41 +01:00
|
|
|
version = lib.attrByPath ["version"] "4.1.0" args;
|
2008-11-30 15:05:43 +00:00
|
|
|
buildInputs = with args; [
|
|
|
|
cmake freeglut mesa
|
|
|
|
libX11 xproto inputproto libXi libXmu
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://files.slembcke.net/chipmunk/release/Chipmunk-${version}.tgz";
|
|
|
|
sha256 = "0ry17lf4kdcac91bpavks2cswch3izsmmam0yhczk7rayj9cvqsh";
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
|
|
|
phaseNames = ["genMakefile" "doMakeInstall" "demoInstall"];
|
|
|
|
|
2009-05-20 00:25:58 +01:00
|
|
|
genMakefile = fullDepEntry ''
|
2008-11-30 15:05:43 +00:00
|
|
|
cmake -D CMAKE_INSTALL_PREFIX=$out .
|
|
|
|
'' ["minInit" "addInputs" "doUnpack"];
|
|
|
|
|
2009-05-20 00:25:58 +01:00
|
|
|
demoInstall = fullDepEntry(''
|
2008-11-30 15:05:43 +00:00
|
|
|
ensureDir $out/bin
|
|
|
|
cp chipmunk_demos $out/bin
|
|
|
|
'') ["doMakeInstall" "defEnsureDir"];
|
|
|
|
|
|
|
|
name = "chipmunk-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "Chipmunk 2D physics engine";
|
|
|
|
};
|
|
|
|
}
|