diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2010-12-17 15:41:30 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2010-12-17 15:41:30 +0000 |
commit | 71822c22deb2083382940c3bcd0ca0fd19394eb7 (patch) | |
tree | 09719ea95b73e08ed5d292bb5e57bec3c9136109 /pkgs/games/the-butterfly-effect | |
parent | af589388b07fd3e22dacdc03df96e85c59e7be2f (diff) |
Adding tbe game
svn path=/nixpkgs/trunk/; revision=25178
Diffstat (limited to 'pkgs/games/the-butterfly-effect')
-rw-r--r-- | pkgs/games/the-butterfly-effect/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/games/the-butterfly-effect/default.nix b/pkgs/games/the-butterfly-effect/default.nix new file mode 100644 index 0000000000000..bcc10ab83962e --- /dev/null +++ b/pkgs/games/the-butterfly-effect/default.nix @@ -0,0 +1,65 @@ +x@{builderDefsPackage + , qt4, box2d_2_0_1 + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="tbe"; + version="8.2"; + name="${baseName}-${version}"; + url="mirror://sourceforge/project/${baseName}/Milestone%20${version}/TheButterflyEffect-m${version}.src.tgz"; + hash="1s6xxvhw5rplpfmrhvfp4kb5z89lhcnrhawam8v7i51rk5hmjkd0"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + phaseNames = ["setVars" /*"patchBox2d"*/ "doConfigure" "doMakeInstall" "doDeploy"]; + configureCommand = "sh configure"; + + setVars = a.noDepEntry '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.box2d_2_0_1}/include/Box2D" + ''; + + 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"]; + + patchBox2d = a.fullDepEntry '' + find . -exec sed -i '{}' -e s@b2XForm@b2Transform@g ';' + '' ["minInit" "doUnpack"]; + + 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 + |