2008-11-30 16:05:43 +01:00
|
|
|
args :
|
|
|
|
let
|
|
|
|
lib = args.lib;
|
|
|
|
fetchurl = args.fetchurl;
|
2009-05-20 01:25:58 +02:00
|
|
|
fullDepEntry = args.fullDepEntry;
|
2008-11-30 16:05:43 +01:00
|
|
|
|
2013-12-18 13:52:14 +01:00
|
|
|
version = lib.attrByPath ["version"] "6.1.5" args;
|
|
|
|
majorVersion = lib.attrByPath ["majorVersion"] "6" args;
|
2008-11-30 16:05:43 +01:00
|
|
|
buildInputs = with args; [
|
2013-12-18 13:52:14 +01:00
|
|
|
cmake freeglut mesa
|
2008-11-30 16:05:43 +01:00
|
|
|
libX11 xproto inputproto libXi libXmu
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
2012-01-05 12:56:32 +01:00
|
|
|
url = "http://files.slembcke.net/chipmunk/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
|
2013-12-18 13:52:14 +01:00
|
|
|
sha256 = "0rhsgl32k6bja2ipzprf7iv3lscbl8h8s9il625rp966jvq6phy7";
|
2008-11-30 16:05:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
|
|
|
phaseNames = ["genMakefile" "doMakeInstall" "demoInstall"];
|
|
|
|
|
2009-05-20 01:25:58 +02:00
|
|
|
genMakefile = fullDepEntry ''
|
2008-11-30 16:05:43 +01:00
|
|
|
cmake -D CMAKE_INSTALL_PREFIX=$out .
|
|
|
|
'' ["minInit" "addInputs" "doUnpack"];
|
|
|
|
|
2009-05-20 01:25:58 +02:00
|
|
|
demoInstall = fullDepEntry(''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2012-01-05 12:56:32 +01:00
|
|
|
cp Demo/chipmunk_demos $out/bin
|
2008-11-30 16:05:43 +01:00
|
|
|
'') ["doMakeInstall" "defEnsureDir"];
|
|
|
|
|
|
|
|
name = "chipmunk-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "Chipmunk 2D physics engine";
|
|
|
|
};
|
|
|
|
}
|