Merge pull request #103077 from freezeboy/add-colobot
This commit is contained in:
commit
f423aea36a
41
pkgs/games/colobot/data.nix
Normal file
41
pkgs/games/colobot/data.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ stdenv, lib, fetchFromGitHub, cmake
|
||||
, gettext, vorbis-tools
|
||||
, xmlstarlet, doxygen, python3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "colobot-data";
|
||||
version = "0.1.12-alpha";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "colobot";
|
||||
repo = "colobot-data";
|
||||
rev = "colobot-gold-${version}";
|
||||
sha256 = "1vm33s52ymwd03x24i9bqiglw5v3wgd7rlzyx9r5ww0nnqzwbwi6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake vorbis-tools xmlstarlet doxygen python3 ];
|
||||
buildInputs = [ gettext ];
|
||||
|
||||
enableParallelBuilding = false;
|
||||
# Build procedure requires the data folder
|
||||
patchPhase = ''
|
||||
cp -r $src localSrc
|
||||
chmod +w localSrc/help/bots/po
|
||||
find -type d -exec chmod +w {} \;
|
||||
for po in localSrc/help/{bots,cbot,object,generic,programs}/po/* localSrc/levels/*{/*/*,}/po/*; do
|
||||
rm $po
|
||||
touch $po
|
||||
done
|
||||
# skip music
|
||||
rm localSrc/music/CMakeLists.txt
|
||||
cd localSrc
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://colobot.info/";
|
||||
description = "Game data for colobot";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ freezeboy ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
41
pkgs/games/colobot/default.nix
Normal file
41
pkgs/games/colobot/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ stdenv, fetchFromGitHub, cmake, boost, SDL2, SDL2_image, SDL2_ttf, libpng
|
||||
, 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
|
||||
version = "0.1.12-alpha";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "colobot";
|
||||
repo = "colobot";
|
||||
rev = "colobot-gold-${version}";
|
||||
sha256 = "0viq5s4zqs33an7rdmc3anf74ml7mwwcwf60alhvp9hj5jr547s2";
|
||||
};
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
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;
|
||||
};
|
||||
}
|
|
@ -192,6 +192,8 @@ in
|
|||
|
||||
corgi = callPackage ../development/tools/corgi { };
|
||||
|
||||
colobot = callPackage ../games/colobot {};
|
||||
|
||||
colorz = callPackage ../tools/misc/colorz { };
|
||||
|
||||
colorpicker = callPackage ../tools/misc/colorpicker { };
|
||||
|
|
Loading…
Reference in a new issue