2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, libtheora, xvidcore, libGLU, libGL, SDL, SDL_ttf, SDL_mixer
|
2020-04-24 23:36:52 +00:00
|
|
|
, curl, libjpeg, libpng, gettext, cunit, enableEditor?false }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "ufoai";
|
|
|
|
version = "2.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-06-28 23:13:55 +00:00
|
|
|
url = "mirror://sourceforge/ufoai/ufoai-${version}-source.tar.bz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0kxrbcjrharcwz319s90m789i4my9285ihp5ax6kfhgif2vn2ji5";
|
|
|
|
};
|
|
|
|
|
|
|
|
srcData = fetchurl {
|
2021-06-28 23:13:55 +00:00
|
|
|
url = "mirror://sourceforge/ufoai/ufoai-${version}-data.tar";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1drhh08cqqkwv1yz3z4ngkplr23pqqrdx6cp8c3isy320gy25cvb";
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''tar xvf "${srcData}"'';
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-release" "--enable-sse" ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional enableEditor "--enable-uforadiant";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libtheora xvidcore libGLU libGL SDL SDL_ttf SDL_mixer
|
|
|
|
curl libjpeg libpng gettext cunit
|
|
|
|
];
|
|
|
|
|
|
|
|
NIX_CFLAGS_LINK = "-lgcc_s"; # to avoid occasional runtime error in finding libgcc_s.so.1
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://ufoai.org";
|
|
|
|
description = "A squad-based tactical strategy game in the tradition of X-Com";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [viric];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
hydraPlatforms = [];
|
|
|
|
};
|
|
|
|
}
|