summary refs log blame commit diff
path: root/pkgs/games/opentyrian/default.nix
blob: 2dae58df9765e51c6a96a472d49d0dd4897d5202 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                           

                         
                       
                           
 


                                                                              

    
                   
                                                                               
                                                                    

    
                              





                                                                
                     
                            
                                       
                                            


          
                                                            
                                                           



                                           
{stdenv, fetchurl, fetchzip, SDL, SDL_net}:

stdenv.mkDerivation rec {
  pname = "opentyrian";
  version = "2.1.20130907";

  src = fetchurl {
    url = "https://bitbucket.org/opentyrian/opentyrian/get/${version}.tar.gz";
    sha256 = "1jnrkq616pc4dhlbd4n30d65vmn25q84w6jfv9383l9q20cqf2ph";
  };

  data = fetchzip {
    url = http://sites.google.com/a/camanis.net/opentyrian/tyrian/tyrian21.zip;
    sha256 = "1biz6hf6s7qrwn8ky0g6p8w7yg715w7yklpn6258bkks1s15hpdb";
  };

  buildInputs = [SDL SDL_net];

  patchPhase = "
    substituteInPlace src/file.c --replace /usr/share $out/share
  ";
  buildPhase = "make release";
  installPhase = "
    mkdir -p $out/bin
    cp ./opentyrian $out/bin
    mkdir -p $out/share/opentyrian/data
    cp -r $data/* $out/share/opentyrian/data
  ";

  meta = {
    description = ''Open source port of the game "Tyrian"'';
    homepage = https://bitbucket.org/opentyrian/opentyrian;
    # This does not account of Tyrian data.
    # license = stdenv.lib.licenses.gpl2;
  };
}