2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchzip
|
|
|
|
, SDL2
|
|
|
|
, SDL2_net
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "opentyrian";
|
2023-03-27 19:17:25 +00:00
|
|
|
version = "2.1.20221123";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opentyrian";
|
|
|
|
repo = "opentyrian";
|
|
|
|
rev = "v${version}";
|
2023-03-27 19:17:25 +00:00
|
|
|
sha256 = "sha256-fVcc8v1c9uU72X6afEo4VoMo6YuDECQSwDQ/TQjgwUY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
data = fetchzip {
|
2022-05-18 14:49:53 +00:00
|
|
|
url = "https://camanis.net/tyrian/tyrian21.zip";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1biz6hf6s7qrwn8ky0g6p8w7yg715w7yklpn6258bkks1s15hpdb";
|
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ SDL2 SDL2_net ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
makeFlags = [ "prefix=${placeholder "out"}" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/games/tyrian
|
|
|
|
cp -r $data/* $out/share/games/tyrian/
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = ''Open source port of the game "Tyrian"'';
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/opentyrian/opentyrian";
|
2020-04-24 23:36:52 +00:00
|
|
|
# This does not account of Tyrian data.
|
2021-01-15 22:18:51 +00:00
|
|
|
# license = lib.licenses.gpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|