2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, SDL2, SDL2_image, SDL2_ttf, libpng
|
2021-01-05 17:05:55 +00:00
|
|
|
, glew, gettext, libsndfile, libvorbis, libogg, physfs, openal
|
|
|
|
, xmlstarlet, doxygen, python3, callPackage }:
|
|
|
|
|
|
|
|
let
|
|
|
|
colobot-data = callPackage ./data.nix {};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "colobot";
|
|
|
|
# Maybe require an update to package colobot-data as well
|
|
|
|
# in file data.nix next to this one
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "0.2.0-alpha";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "colobot";
|
2022-01-03 16:56:52 +00:00
|
|
|
repo = pname;
|
2021-01-05 17:05:55 +00:00
|
|
|
rev = "colobot-gold-${version}";
|
2022-01-03 16:56:52 +00:00
|
|
|
sha256 = "sha256-Nu7NyicNIk5yza9sXfd4KbGdB65guVuGREd6rwRU3lU=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake xmlstarlet doxygen python3 ];
|
|
|
|
buildInputs = [ boost SDL2 SDL2_image SDL2_ttf libpng glew gettext libsndfile libvorbis libogg physfs openal ];
|
|
|
|
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
|
|
|
# The binary ends in games directoy
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/games $out/bin
|
|
|
|
for contents in ${colobot-data}/share/games/colobot/*; do
|
|
|
|
ln -s $contents $out/share/games/colobot
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-05 17:05:55 +00:00
|
|
|
homepage = "https://colobot.info/";
|
|
|
|
description = "Colobot: Gold Edition is a real-time strategy game, where you can program your bots";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ freezeboy ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|