2014-10-31 22:50:15 +00:00
|
|
|
{ stdenv, fetchurl, mesa, SDL, scons, SDL_ttf, SDL_image, zlib, SDL_net
|
|
|
|
, speex, libvorbis, libogg, boost, fribidi, bsdiff
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
version = "0.9.4";
|
|
|
|
patchlevel = "4";
|
|
|
|
tutorial4patch = fetchurl {
|
2011-04-20 08:06:17 +01:00
|
|
|
url = "http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=34;filename=tutorial-part4.map.bspatch;att=1;bug=595448";
|
|
|
|
name = "globulation2-tutorial4-map-patch-debian.bspatch";
|
|
|
|
sha256 = "d3511ac0f822d512c42abd34b3122f2990862d3d0af6ce464ff372f5bd7f35e9";
|
|
|
|
};
|
2014-10-31 22:50:15 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "glob2-${version}.${patchlevel}";
|
2011-04-20 08:06:17 +01:00
|
|
|
|
2014-10-31 22:50:15 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://savannah/glob2/${version}/${name}.tar.gz";
|
|
|
|
sha256 = "1f0l2cqp2g3llhr9jl6jj15k0wb5q8n29vqj99xy4p5hqs78jk8g";
|
|
|
|
};
|
2011-04-19 17:02:29 +01:00
|
|
|
|
2015-08-29 06:09:24 +01:00
|
|
|
patches = [ ./header-order.patch ./public-buildproject.patch ];
|
2011-04-19 17:02:29 +01:00
|
|
|
|
2014-10-31 22:50:15 +00:00
|
|
|
postPatch = ''
|
2011-04-20 08:06:17 +01:00
|
|
|
cp campaigns/tutorial-part4.map{,.orig}
|
|
|
|
bspatch campaigns/tutorial-part4.map{.orig,} ${tutorial4patch}
|
2014-10-31 22:50:15 +00:00
|
|
|
sed -i -e "s@env = Environment()@env = Environment( ENV = os.environ )@" SConstruct
|
|
|
|
'';
|
2011-04-20 08:06:17 +01:00
|
|
|
|
2014-10-31 22:50:15 +00:00
|
|
|
buildInputs = [ mesa SDL scons SDL_ttf SDL_image zlib SDL_net speex libvorbis libogg boost fribidi bsdiff ];
|
2011-04-19 17:02:29 +01:00
|
|
|
|
2014-10-31 22:50:15 +00:00
|
|
|
buildPhase = ''
|
|
|
|
scons
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
scons install \
|
|
|
|
BINDIR=$out/bin \
|
|
|
|
INSTALLDIR=$out/share/globulation2 \
|
|
|
|
DATADIR=$out/share/globulation2/glob2
|
|
|
|
'';
|
2011-04-19 17:02:29 +01:00
|
|
|
|
2014-10-31 22:50:15 +00:00
|
|
|
meta = with stdenv.lib; {
|
2011-04-19 17:02:29 +01:00
|
|
|
description = "RTS without micromanagement";
|
2014-10-31 22:50:15 +00:00
|
|
|
maintainers = with maintainers; [ raskin ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
2011-04-19 17:02:29 +01:00
|
|
|
};
|
2014-10-31 22:50:15 +00:00
|
|
|
passthru.updateInfo.downloadPage = "http://globulation2.org/wiki/Download_and_Install";
|
|
|
|
}
|
2011-04-19 17:02:29 +01:00
|
|
|
|