2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, libGLU, libGL, SDL, sconsPackages, SDL_ttf, SDL_image, zlib, SDL_net
|
2014-10-31 22:50:15 +00:00
|
|
|
, speex, libvorbis, libogg, boost, fribidi, bsdiff
|
2017-08-26 13:56:43 +00:00
|
|
|
, fetchpatch
|
2014-10-31 22:50:15 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
version = "0.9.4";
|
|
|
|
patchlevel = "4";
|
|
|
|
tutorial4patch = fetchurl {
|
2011-04-20 07:06:17 +00: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 07:06:17 +00:00
|
|
|
|
2014-10-31 22:50:15 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://savannah/glob2/${version}/${name}.tar.gz";
|
|
|
|
sha256 = "1f0l2cqp2g3llhr9jl6jj15k0wb5q8n29vqj99xy4p5hqs78jk8g";
|
|
|
|
};
|
2011-04-19 16:02:29 +00:00
|
|
|
|
2017-08-26 13:56:43 +00:00
|
|
|
patches = [ ./header-order.patch ./public-buildproject.patch
|
|
|
|
(fetchpatch {
|
2021-01-19 21:20:11 +00:00
|
|
|
url = "https://bitbucket.org/giszmo/glob2/commits/c9dc715624318e4fea4abb24e04f0ebdd9cd8d2a/raw";
|
|
|
|
sha256 = "0017xg5agj3dy0hx71ijdcrxb72bjqv7x6aq7c9zxzyyw0mkxj0k";
|
|
|
|
})
|
2023-01-06 13:54:14 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.org/data/main/g/glob2/0.9.4.4-6/debian/patches/10_pthread_underlinkage.patch";
|
|
|
|
sha256 = "sha256-L9POADlkgQbUQEUmx4s3dxXG9tS0w2IefpRGuQNRMI0=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.org/data/main/g/glob2/0.9.4.4-6/debian/patches/link-boost-system.patch";
|
|
|
|
sha256 = "sha256-ne6F2ZowB+TUmg3ePuUoPNxXI0ZJC6HEol3oQQHJTy4=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.org/data/main/g/glob2/0.9.4.4-6/debian/patches/scons.patch";
|
|
|
|
sha256 = "sha256-Gah7SoVcd/Aljs0Nqo3YF0lZImUWtrGM4HbbQ4yrhHU=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.org/data/main/g/glob2/0.9.4.4-6/debian/patches/boost-1.69.patch";
|
|
|
|
sha256 = "sha256-D7agFR4uyIHxQz690Q8EHPF+rTEoiGUpgkm7r5cL5SI=";
|
|
|
|
})
|
2017-08-26 13:56:43 +00:00
|
|
|
];
|
2011-04-19 16:02:29 +00:00
|
|
|
|
2014-10-31 22:50:15 +00:00
|
|
|
postPatch = ''
|
2011-04-20 07:06:17 +00: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 07:06:17 +00:00
|
|
|
|
2023-01-06 13:54:14 +00:00
|
|
|
nativeBuildInputs = [ sconsPackages.scons_latest ];
|
2019-11-10 16:44:34 +00:00
|
|
|
buildInputs = [ libGLU libGL SDL SDL_ttf SDL_image zlib SDL_net speex libvorbis libogg boost fribidi bsdiff ];
|
2011-04-19 16:02:29 +00:00
|
|
|
|
2018-11-12 02:52:07 +00:00
|
|
|
postConfigure = ''
|
|
|
|
sconsFlags+=" BINDIR=$out/bin"
|
|
|
|
sconsFlags+=" INSTALLDIR=$out/share/globulation2"
|
|
|
|
sconsFlags+=" DATADIR=$out/share/globulation2/glob2"
|
2014-10-31 22:50:15 +00:00
|
|
|
'';
|
|
|
|
|
2019-10-30 01:29:30 +00:00
|
|
|
NIX_LDFLAGS = "-lboost_system";
|
2019-01-04 19:33:50 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2011-04-19 16:02:29 +00: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 16:02:29 +00:00
|
|
|
};
|
2014-10-31 22:50:15 +00:00
|
|
|
passthru.updateInfo.downloadPage = "http://globulation2.org/wiki/Download_and_Install";
|
|
|
|
}
|