2016-10-10 06:42:12 +00:00
|
|
|
{stdenv, fetchurl, fetchzip, SDL, SDL_net}:
|
2012-04-15 23:38:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "opentyrian";
|
2016-10-10 06:42:12 +00:00
|
|
|
version = "2.1.20130907";
|
2012-04-15 23:38:38 +00:00
|
|
|
|
2016-10-10 06:42:12 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://bitbucket.org/opentyrian/opentyrian/get/${version}.tar.gz";
|
|
|
|
sha256 = "1jnrkq616pc4dhlbd4n30d65vmn25q84w6jfv9383l9q20cqf2ph";
|
2012-04-15 23:38:38 +00:00
|
|
|
};
|
|
|
|
|
2016-10-10 06:42:12 +00:00
|
|
|
data = fetchzip {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "http://sites.google.com/a/camanis.net/opentyrian/tyrian/tyrian21.zip";
|
2016-10-10 06:42:12 +00:00
|
|
|
sha256 = "1biz6hf6s7qrwn8ky0g6p8w7yg715w7yklpn6258bkks1s15hpdb";
|
2012-04-15 23:38:38 +00:00
|
|
|
};
|
|
|
|
|
2016-10-10 06:42:12 +00:00
|
|
|
buildInputs = [SDL SDL_net];
|
2012-04-15 23:38:38 +00:00
|
|
|
|
|
|
|
patchPhase = "
|
|
|
|
substituteInPlace src/file.c --replace /usr/share $out/share
|
|
|
|
";
|
|
|
|
buildPhase = "make release";
|
|
|
|
installPhase = "
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/bin
|
2012-04-15 23:38:38 +00:00
|
|
|
cp ./opentyrian $out/bin
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/share/opentyrian/data
|
2016-10-10 06:42:12 +00:00
|
|
|
cp -r $data/* $out/share/opentyrian/data
|
2012-04-15 23:38:38 +00:00
|
|
|
";
|
|
|
|
|
|
|
|
meta = {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = ''Open source port of the game "Tyrian"'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://bitbucket.org/opentyrian/opentyrian";
|
2012-04-15 23:38:38 +00:00
|
|
|
# This does not account of Tyrian data.
|
|
|
|
# license = stdenv.lib.licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|