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