27 , withAI ? true # support for AI Interfaces and Skirmish AIs
30 stdenv.mkDerivation rec {
35 url = "https://springrts.com/dl/buildbot/default/master/${version}/source/spring_${version}_src.tar.gz";
36 sha256 = "sha256-mSA4ioIv68NMEB72lYnwDb1QOuWr1VHwu4+grAoHlV0=";
42 substituteInPlace ./rts/build/cmake/FindAsciiDoc.cmake \
43 --replace "PATHS /usr /usr/share /usr/local /usr/local/share" "PATHS ${docbook_xsl}"\
44 --replace "xsl/docbook/manpages" "share/xml/docbook-xsl/manpages"
46 # The cmake included module correcly finds nix's glew, however
47 # it has to be the bundled FindGLEW for headless or dedicated builds
48 rm rts/build/cmake/FindGLEW.cmake
52 "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON"
53 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON"
54 "-DPREFER_STATIC_LIBS:BOOL=OFF"
57 nativeBuildInputs = [ cmake makeWrapper docbook_xsl docbook_xsl_ns asciidoc ];
77 ++ lib.optionals withAI [ python3 jdk ];
80 wrapProgram "$out/bin/spring" \
81 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
85 homepage = "https://springrts.com/";
86 description = "A powerful real-time strategy (RTS) game engine";
87 license = licenses.gpl2Plus;
88 maintainers = with maintainers; [ qknight domenkozar sorki ];
89 platforms = [ "x86_64-linux" ];