Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, SDL2, SDL2_image, SDL2_ttf, libpng 2, glew, gettext, libsndfile, libvorbis, libogg, physfs, openal 3, xmlstarlet, doxygen, python3, callPackage }: 4 5let 6 colobot-data = callPackage ./data.nix {}; 7in 8stdenv.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.2.0-alpha"; 13 14 src = fetchFromGitHub { 15 owner = "colobot"; 16 repo = pname; 17 rev = "colobot-gold-${version}"; 18 sha256 = "sha256-Nu7NyicNIk5yza9sXfd4KbGdB65guVuGREd6rwRU3lU="; 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 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}