summaryrefslogtreecommitdiffstats
path: root/pkgs/games/globulation/default.nix
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2011-04-19 16:02:29 +0000
committerMichael Raskin <7c6f434c@mail.ru>2011-04-19 16:02:29 +0000
commit451040c2996d4d338559126a17fd7e07ff4c52dc (patch)
tree9ff6d009c8ff8c201db76916a335f0d204d864ea /pkgs/games/globulation/default.nix
parent989b65cf5b6c21510800025cceee9e7199d3a49a (diff)
Adding globulation
svn path=/nixpkgs/trunk/; revision=26892
Diffstat (limited to 'pkgs/games/globulation/default.nix')
-rw-r--r--pkgs/games/globulation/default.nix68
1 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/games/globulation/default.nix b/pkgs/games/globulation/default.nix
new file mode 100644
index 000000000000..efdf5d470892
--- /dev/null
+++ b/pkgs/games/globulation/default.nix
@@ -0,0 +1,68 @@
+x@{builderDefsPackage
+ , mesa, SDL, scons, SDL_ttf, SDL_image, zlib, SDL_net, speex, libvorbis
+ , libogg, boost, fribidi
+ , ...}:
+builderDefsPackage
+(a :
+let
+ helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
+ [];
+
+ buildInputs = map (n: builtins.getAttr n x)
+ (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+ sourceInfo = rec {
+ baseName="glob2";
+ version="0.9.4";
+ patchlevel="4";
+ name="${baseName}-${version}.${patchlevel}";
+ url="http://dl.sv.nongnu.org/releases/glob2/${version}/${name}.tar.gz";
+ hash="1f0l2cqp2g3llhr9jl6jj15k0wb5q8n29vqj99xy4p5hqs78jk8g";
+ };
+in
+rec {
+ src = a.fetchurl {
+ url = sourceInfo.url;
+ sha256 = sourceInfo.hash;
+ };
+
+ inherit (sourceInfo) name version;
+ inherit buildInputs;
+
+ /* doConfigure should be removed if not needed */
+ phaseNames = ["doUnpack" "doPatch" "workaroundScons" "doScons"];
+
+ patches = [./header-order.patch];
+
+ # FIXME
+ # I officially fail to understand what goes on, but that seems to work
+ # too well not to use. Yes, it is ugly, I know...
+ workaroundScons = a.fullDepEntry ''
+ echo '#! ${a.stdenv.shell}' >> o
+ echo 'g++ -o "$@"' >> o
+ chmod a+x o
+ export PATH="$PATH:$PWD"
+ '' ["minInit"];
+
+ sconsFlags = [
+ "DATADIR=$out/share/globulation2/glob2"
+ "BINDIR=$out/bin"
+ "INSTALLDIR=$out/share/globulation2"
+ ];
+
+ meta = {
+ description = "RTS without micromanagement";
+ maintainers = with a.lib.maintainers;
+ [
+ raskin
+ ];
+ platforms = with a.lib.platforms;
+ linux;
+ license = a.lib.licenses.gpl3;
+ };
+ passthru = {
+ updateInfo = {
+ downloadPage = "http://globulation2.org/wiki/Download_and_Install";
+ };
+ };
+}) x
+