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