2010-12-17 15:41:30 +00:00
|
|
|
x@{builderDefsPackage
|
2012-02-20 05:28:06 +00:00
|
|
|
, qt4, box2d, which
|
2014-08-22 18:34:17 +01:00
|
|
|
,fetchsvn, cmake
|
2010-12-17 15:41:30 +00:00
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
2014-07-28 10:43:20 +01:00
|
|
|
(a :
|
|
|
|
let
|
|
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
2011-02-04 16:38:22 +00:00
|
|
|
["fetchsvn"];
|
2010-12-17 15:41:30 +00:00
|
|
|
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
|
|
sourceInfo = rec {
|
|
|
|
baseName="tbe";
|
2014-08-22 18:34:17 +01:00
|
|
|
revision="2048";
|
2011-02-04 16:38:22 +00:00
|
|
|
version="r${revision}";
|
2010-12-17 15:41:30 +00:00
|
|
|
name="${baseName}-${version}";
|
2011-02-04 16:38:22 +00:00
|
|
|
url="https://tbe.svn.sourceforge.net/svnroot/tbe/trunk";
|
2014-08-22 18:34:17 +01:00
|
|
|
hash="19pqpkil4r5y9j4nszkbs70lq720nvqw8g8magd8nf2n3l9nqm51";
|
2010-12-17 15:41:30 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
rec {
|
2011-02-04 16:38:22 +00:00
|
|
|
srcDrv = a.fetchsvn {
|
2010-12-17 15:41:30 +00:00
|
|
|
url = sourceInfo.url;
|
|
|
|
sha256 = sourceInfo.hash;
|
2011-02-04 16:38:22 +00:00
|
|
|
rev = sourceInfo.revision;
|
2010-12-17 15:41:30 +00:00
|
|
|
};
|
2011-02-04 16:38:22 +00:00
|
|
|
src = srcDrv + "/";
|
2010-12-17 15:41:30 +00:00
|
|
|
|
|
|
|
inherit (sourceInfo) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
|
2014-08-22 18:34:17 +01:00
|
|
|
phaseNames = ["setVars" "doCmake" "doMakeInstall" "doDeploy"];
|
2010-12-17 15:41:30 +00:00
|
|
|
|
|
|
|
setVars = a.noDepEntry ''
|
2011-02-04 16:38:22 +00:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.box2d}/include/Box2D"
|
2010-12-17 15:41:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doDeploy = a.fullDepEntry ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/tbe"
|
2010-12-17 15:41:30 +00:00
|
|
|
cp -r . "$out/share/tbe/build-dir"
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/bin"
|
2012-11-10 11:14:28 +00:00
|
|
|
echo '#!${a.stdenv.shell}' >> "$out/bin/tbe"
|
2010-12-17 15:41:30 +00:00
|
|
|
echo "$out/share/tbe/build-dir/tbe \"\$@\"" >> "$out/bin/tbe"
|
|
|
|
chmod a+x "$out/bin/tbe"
|
|
|
|
'' ["minInit" "doMake" "defEnsureDir"];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A physics-based game vaguely similar to Incredible Machine";
|
|
|
|
maintainers = with a.lib.maintainers;
|
|
|
|
[
|
|
|
|
raskin
|
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux;
|
2014-07-28 10:43:20 +01:00
|
|
|
license = a.stdenv.lib.licenses.gpl2;
|
2010-12-17 15:41:30 +00:00
|
|
|
};
|
|
|
|
passthru = {
|
2011-02-06 14:13:31 +00:00
|
|
|
inherit srcDrv;
|
2010-12-17 15:41:30 +00:00
|
|
|
updateInfo = {
|
|
|
|
downloadPage = "http://sourceforge.net/projects/tbe/files/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}) x
|