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
|
|
|
|
2012-01-05 11:56:32 +00:00
|
|
|
version = lib.attrByPath ["version"] "6.0.3" args;
|
|
|
|
majorVersion = lib.attrByPath ["majorVersion"] "6" args;
|
2008-11-30 15:05:43 +00:00
|
|
|
buildInputs = with args; [
|
|
|
|
cmake freeglut mesa
|
|
|
|
libX11 xproto inputproto libXi libXmu
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
2012-01-05 11:56:32 +00:00
|
|
|
url = "http://files.slembcke.net/chipmunk/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
|
|
|
|
sha256 = "c6f550454bc1c63a2a63e0ff8febecb4781a528ab6d6b657a17933a6f567541a";
|
2008-11-30 15:05:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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(''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2012-01-05 11:56:32 +00:00
|
|
|
cp Demo/chipmunk_demos $out/bin
|
2008-11-30 15:05:43 +00:00
|
|
|
'') ["doMakeInstall" "defEnsureDir"];
|
|
|
|
|
|
|
|
name = "chipmunk-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "Chipmunk 2D physics engine";
|
|
|
|
};
|
|
|
|
}
|