2010-12-17 16:41:30 +01:00
|
|
|
x@{builderDefsPackage
|
2011-02-04 17:38:22 +01:00
|
|
|
, qt4, box2d
|
|
|
|
,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-04 17:38:22 +01:00
|
|
|
revision="1316";
|
|
|
|
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";
|
|
|
|
hash="0ag1nl4yf42ixwaly93fg2kcry71nrfq54z4w556qfh0i44fhcvd";
|
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 ''
|
|
|
|
ensureDir "$out/share/tbe"
|
|
|
|
cp -r . "$out/share/tbe/build-dir"
|
|
|
|
ensureDir "$out/bin"
|
|
|
|
echo '#! /bin/sh' >> "$out/bin/tbe"
|
|
|
|
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 = {
|
|
|
|
updateInfo = {
|
|
|
|
downloadPage = "http://sourceforge.net/projects/tbe/files/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}) x
|
|
|
|
|