nixpkgs/pkgs/games/opentyrian/default.nix

37 lines
1018 B
Nix
Raw Normal View History

2016-10-10 07:42:12 +01:00
{stdenv, fetchurl, fetchzip, SDL, SDL_net}:
stdenv.mkDerivation rec {
name = "opentyrian-${version}";
2016-10-10 07:42:12 +01:00
version = "2.1.20130907";
2016-10-10 07:42:12 +01:00
src = fetchurl {
url = "https://bitbucket.org/opentyrian/opentyrian/get/${version}.tar.gz";
sha256 = "1jnrkq616pc4dhlbd4n30d65vmn25q84w6jfv9383l9q20cqf2ph";
};
2016-10-10 07:42:12 +01:00
data = fetchzip {
url = http://sites.google.com/a/camanis.net/opentyrian/tyrian/tyrian21.zip;
2016-10-10 07:42:12 +01:00
sha256 = "1biz6hf6s7qrwn8ky0g6p8w7yg715w7yklpn6258bkks1s15hpdb";
};
2016-10-10 07:42:12 +01:00
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
2016-10-10 07:42:12 +01:00
cp -r $data/* $out/share/opentyrian/data
";
meta = {
description = ''Open source port of the game "Tyrian"'';
2016-10-10 07:42:12 +01:00
homepage = https://bitbucket.org/opentyrian/opentyrian;
# This does not account of Tyrian data.
# license = stdenv.lib.licenses.gpl2;
};
}