nixpkgs/pkgs/games/the-butterfly-effect/default.nix

65 lines
1.6 KiB
Nix
Raw Normal View History

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