2016-04-18 14:48:38 +01:00
|
|
|
{ stdenv, fetchurl, cmake, boost, SDL2, python2, freetype, openal, libogg, libvorbis, zlib, libpng, libtiff, libjpeg, mesa, glew, doxygen
|
|
|
|
, libxslt, makeWrapper }:
|
2016-04-16 00:37:09 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-12-28 18:52:42 +00:00
|
|
|
version = "0.4.6";
|
2016-04-16 00:37:09 +01:00
|
|
|
name = "freeorion-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2016-12-28 18:52:42 +00:00
|
|
|
url = "https://github.com/freeorion/freeorion/releases/download/v0.4.6/FreeOrion_v0.4.6_2016-09-16.49f9123_Source.tar.gz";
|
|
|
|
sha256 = "04g3x1cymf7mnmc2f5mm3c2r5izjmy7z3pvk2ykzz8f8b2kz6gry";
|
2016-04-16 00:37:09 +01:00
|
|
|
};
|
|
|
|
|
2016-04-18 14:48:38 +01:00
|
|
|
buildInputs = [ cmake boost SDL2 python2 freetype openal libogg libvorbis zlib libpng libtiff libjpeg mesa glew doxygen makeWrapper ];
|
2016-04-16 00:37:09 +01:00
|
|
|
|
2016-12-28 18:52:42 +00:00
|
|
|
patches = [
|
|
|
|
./fix_rpaths.patch
|
|
|
|
];
|
2016-04-16 00:37:09 +01:00
|
|
|
|
2016-04-18 14:48:17 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-04-18 14:48:38 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/fixpaths
|
|
|
|
# We need final slashes for XSLT replace to work properly
|
|
|
|
substitute ${./fix-paths.xslt} $out/fixpaths/fix-paths.xslt \
|
|
|
|
--subst-var-by nixStore "$NIX_STORE/" \
|
|
|
|
--subst-var-by out "$out/"
|
|
|
|
substitute ${./fix-paths.sh} $out/fixpaths/fix-paths \
|
|
|
|
--subst-var-by libxsltBin ${libxslt.bin} \
|
|
|
|
--subst-var out
|
|
|
|
chmod +x $out/fixpaths/fix-paths
|
|
|
|
|
|
|
|
wrapProgram $out/bin/freeorion \
|
|
|
|
--run $out/fixpaths/fix-paths
|
|
|
|
'';
|
|
|
|
|
2016-04-16 00:37:09 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A free, open source, turn-based space empire and galactic conquest (4X) computer game";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.freeorion.org;
|
2016-04-16 00:37:09 +01:00
|
|
|
license = [ licenses.gpl2 licenses.cc-by-sa-30 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|