2010-12-17 16:41:30 +01:00
|
|
|
x@{builderDefsPackage
|
2012-02-20 06:28:06 +01:00
|
|
|
, qt4, box2d, which
|
2011-02-04 17:38:22 +01:00
|
|
|
,fetchsvn
|
2010-12-17 16:41:30 +01:00
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
|
|
|
(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";
|
2011-02-06 15:13:31 +01:00
|
|
|
revision="1319";
|
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";
|
2011-02-06 15:13:31 +01:00
|
|
|
hash="e9a7c24f0668ba2f36c472c1d05238fa7d9ed2150d99ce8a927285d099cc0f7f";
|
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;
|
|
|
|
|
2011-02-04 17:38:22 +01:00
|
|
|
phaseNames = ["setVars" "doConfigure" "doMakeInstall" "doDeploy"];
|
2010-12-17 16:41:30 +01:00
|
|
|
configureCommand = "sh configure";
|
|
|
|
|
|
|
|
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;
|
|
|
|
license = "GPLv2";
|
|
|
|
};
|
|
|
|
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
|
|
|
|
|