2024-07-17 03:26:36 +00:00
|
|
|
{ stdenv
|
2022-05-06 17:02:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchzip
|
|
|
|
, SDL2
|
|
|
|
, SDL2_net
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2012-04-15 23:38:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "opentyrian";
|
2023-03-26 08:29:03 +00:00
|
|
|
version = "2.1.20221123";
|
2012-04-15 23:38:38 +00:00
|
|
|
|
2022-05-06 17:02:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opentyrian";
|
|
|
|
repo = "opentyrian";
|
|
|
|
rev = "v${version}";
|
2023-03-26 08:29:03 +00:00
|
|
|
sha256 = "sha256-fVcc8v1c9uU72X6afEo4VoMo6YuDECQSwDQ/TQjgwUY=";
|
2012-04-15 23:38:38 +00:00
|
|
|
};
|
|
|
|
|
2016-10-10 06:42:12 +00:00
|
|
|
data = fetchzip {
|
2022-05-06 17:02:12 +00:00
|
|
|
url = "https://camanis.net/tyrian/tyrian21.zip";
|
2016-10-10 06:42:12 +00:00
|
|
|
sha256 = "1biz6hf6s7qrwn8ky0g6p8w7yg715w7yklpn6258bkks1s15hpdb";
|
2012-04-15 23:38:38 +00:00
|
|
|
};
|
|
|
|
|
2022-05-06 17:02:12 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ SDL2 SDL2_net ];
|
2012-04-15 23:38:38 +00:00
|
|
|
|
2022-05-06 17:02:12 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
makeFlags = [ "prefix=${placeholder "out"}" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/games/tyrian
|
|
|
|
cp -r $data/* $out/share/games/tyrian/
|
|
|
|
'';
|
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"'';
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "opentyrian";
|
2022-05-06 17:02:12 +00:00
|
|
|
homepage = "https://github.com/opentyrian/opentyrian";
|
2012-04-15 23:38:38 +00:00
|
|
|
# This does not account of Tyrian data.
|
2021-01-15 04:31:39 +00:00
|
|
|
# license = lib.licenses.gpl2;
|
2012-04-15 23:38:38 +00:00
|
|
|
};
|
|
|
|
}
|