@@ -0,0 +1,41 @@
1+{ stdenv, fetchFromGitHub, cmake, boost, SDL2, SDL2_image, SDL2_ttf, libpng
2+, glew, gettext, libsndfile, libvorbis, libogg, physfs, openal
3+, xmlstarlet, doxygen, python3, callPackage }:
4+
5+let
6+ colobot-data = callPackage ./data.nix {};
7+in
8+stdenv.mkDerivation rec {
9+ pname = "colobot";
10+ # Maybe require an update to package colobot-data as well
11+ # in file data.nix next to this one
12+ version = "0.1.12-alpha";
13+
14+ src = fetchFromGitHub {
15+ owner = "colobot";
16+ repo = "colobot";
17+ rev = "colobot-gold-${version}";
18+ sha256 = "0viq5s4zqs33an7rdmc3anf74ml7mwwcwf60alhvp9hj5jr547s2";
19+ };
20+
21+ nativeBuildInputs = [ cmake xmlstarlet doxygen python3 ];
22+ buildInputs = [ boost SDL2 SDL2_image SDL2_ttf libpng glew gettext libsndfile libvorbis libogg physfs openal ];
23+
24+ enableParallelBuilding = false;
25+
26+ # The binary ends in games directoy
27+ postInstall = ''
28+ mv $out/games $out/bin
29+ for contents in ${colobot-data}/share/games/colobot/*; do
30+ ln -s $contents $out/share/games/colobot
31+ done
32+ '';
33+
34+ meta = with stdenv.lib; {
35+ homepage = "https://colobot.info/";
36+ description = "Colobot: Gold Edition is a real-time strategy game, where you can program your bots";
37+ license = licenses.gpl3;
38+ maintainers = with maintainers; [ freezeboy ];
39+ platforms = platforms.linux;
40+ };
41+}