2022-11-08 23:58:23 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, asciidoc
|
2022-12-08 22:44:42 +00:00
|
|
|
, boost
|
|
|
|
, cmake
|
|
|
|
, curl
|
2022-11-08 23:58:23 +00:00
|
|
|
, docbook_xsl
|
|
|
|
, docbook_xsl_ns
|
2022-12-08 22:44:42 +00:00
|
|
|
, fetchurl
|
|
|
|
, freetype
|
|
|
|
, glew
|
2022-11-08 23:58:23 +00:00
|
|
|
, jdk
|
2022-12-08 22:44:42 +00:00
|
|
|
, libdevil
|
|
|
|
, libGL
|
|
|
|
, libGLU
|
2022-11-08 23:58:23 +00:00
|
|
|
, libunwind
|
2022-12-08 22:44:42 +00:00
|
|
|
, libvorbis
|
|
|
|
, makeWrapper
|
2022-11-08 23:58:23 +00:00
|
|
|
, minizip
|
2022-12-08 22:44:42 +00:00
|
|
|
, openal
|
|
|
|
, p7zip
|
|
|
|
, python3
|
|
|
|
, SDL2
|
|
|
|
, xorg
|
|
|
|
, xz
|
|
|
|
, zlib
|
2010-11-13 07:47:04 +00:00
|
|
|
, withAI ? true # support for AI Interfaces and Skirmish AIs
|
|
|
|
}:
|
2014-02-08 17:16:28 +00:00
|
|
|
|
2010-11-13 07:47:04 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "spring";
|
2022-12-08 22:44:42 +00:00
|
|
|
version = "106.0";
|
2020-03-20 22:37:21 +00:00
|
|
|
|
2022-12-08 22:44:42 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://springrts.com/dl/buildbot/default/master/${version}/source/spring_${version}_src.tar.gz";
|
|
|
|
sha256 = "sha256-mSA4ioIv68NMEB72lYnwDb1QOuWr1VHwu4+grAoHlV0=";
|
2010-11-13 07:47:04 +00:00
|
|
|
};
|
|
|
|
|
2022-12-08 22:44:42 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
|
2016-05-03 09:19:19 +00:00
|
|
|
substituteInPlace ./rts/build/cmake/FindAsciiDoc.cmake \
|
|
|
|
--replace "PATHS /usr /usr/share /usr/local /usr/local/share" "PATHS ${docbook_xsl}"\
|
|
|
|
--replace "xsl/docbook/manpages" "share/xml/docbook-xsl/manpages"
|
2020-03-20 22:37:21 +00:00
|
|
|
|
2022-12-08 22:44:42 +00:00
|
|
|
# The cmake included module correcly finds nix's glew, however
|
|
|
|
# it has to be the bundled FindGLEW for headless or dedicated builds
|
|
|
|
rm rts/build/cmake/FindGLEW.cmake
|
2016-05-03 09:19:19 +00:00
|
|
|
'';
|
|
|
|
|
2022-11-08 23:58:23 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON"
|
|
|
|
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON"
|
|
|
|
"-DPREFER_STATIC_LIBS:BOOL=OFF"
|
|
|
|
];
|
2014-02-08 17:09:27 +00:00
|
|
|
|
2020-12-31 17:20:18 +00:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper docbook_xsl docbook_xsl_ns asciidoc ];
|
2022-11-08 23:58:23 +00:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
2022-12-08 22:44:42 +00:00
|
|
|
curl
|
|
|
|
freetype
|
|
|
|
glew
|
2022-11-08 23:58:23 +00:00
|
|
|
libdevil
|
2022-12-08 22:44:42 +00:00
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libunwind
|
2022-11-08 23:58:23 +00:00
|
|
|
libvorbis
|
2022-12-08 22:44:42 +00:00
|
|
|
minizip
|
|
|
|
openal
|
|
|
|
p7zip
|
2022-11-08 23:58:23 +00:00
|
|
|
SDL2
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
2022-12-08 22:44:42 +00:00
|
|
|
xz
|
|
|
|
zlib
|
2022-11-08 23:58:23 +00:00
|
|
|
]
|
2022-12-08 22:44:42 +00:00
|
|
|
++ lib.optionals withAI [ python3 jdk ];
|
2014-09-04 19:02:14 +00:00
|
|
|
|
2014-02-09 22:52:59 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/spring" \
|
2022-12-08 22:44:42 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
|
2014-02-09 22:52:59 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://springrts.com/";
|
2013-10-07 15:36:47 +00:00
|
|
|
description = "A powerful real-time strategy (RTS) game engine";
|
2022-11-08 23:58:23 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2021-12-18 09:25:46 +00:00
|
|
|
maintainers = with maintainers; [ qknight domenkozar sorki ];
|
2022-12-08 22:44:42 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-03-03 18:43:12 +00:00
|
|
|
broken = true;
|
2010-11-13 07:47:04 +00:00
|
|
|
};
|
2011-12-11 18:35:23 +00:00
|
|
|
}
|