2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2020-08-20 17:08:02 +00:00
|
|
|
, SDL2, cmake, curl, duktape, fontconfig, freetype, icu, jansson, libGLU
|
2020-11-24 20:58:05 +00:00
|
|
|
, libiconv, libpng, libpthreadstubs, libzip, nlohmann_json, openssl, pkgconfig
|
|
|
|
, speexdsp, zlib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2020-11-24 20:58:05 +00:00
|
|
|
version = "0.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
openrct2-src = fetchFromGitHub {
|
|
|
|
owner = "OpenRCT2";
|
|
|
|
repo = "OpenRCT2";
|
|
|
|
rev = "v${version}";
|
2020-11-24 20:58:05 +00:00
|
|
|
sha256 = "1fd32wniiy6qz2046ppqfj2sb3rf2qf086rf9v1bdhyj254d0b1z";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
objects-src = fetchFromGitHub {
|
|
|
|
owner = "OpenRCT2";
|
|
|
|
repo = "objects";
|
2020-11-24 20:58:05 +00:00
|
|
|
rev = "v1.0.18";
|
|
|
|
sha256 = "1v9424kxdppg8vszv0vyq91lzljkrjc3nmk58wbwlpcwj6dip07s";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
title-sequences-src = fetchFromGitHub {
|
|
|
|
owner = "OpenRCT2";
|
|
|
|
repo = "title-sequences";
|
|
|
|
rev = "v0.1.2c";
|
|
|
|
sha256 = "1qdrm4q75bznmgdrpjdaiqvbf3q4vwbkkmls45izxvyg1djrpsdf";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit version;
|
|
|
|
pname = "openrct2";
|
|
|
|
|
|
|
|
src = openrct2-src;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkgconfig
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
curl
|
2020-08-20 17:08:02 +00:00
|
|
|
duktape
|
2020-04-24 23:36:52 +00:00
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
icu
|
|
|
|
jansson
|
2020-08-20 17:08:02 +00:00
|
|
|
libGLU
|
2020-04-24 23:36:52 +00:00
|
|
|
libiconv
|
|
|
|
libpng
|
|
|
|
libpthreadstubs
|
|
|
|
libzip
|
2020-11-24 20:58:05 +00:00
|
|
|
nlohmann_json
|
2020-04-24 23:36:52 +00:00
|
|
|
openssl
|
|
|
|
speexdsp
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
cp -r ${objects-src} $sourceRoot/data/object
|
2020-08-20 17:08:02 +00:00
|
|
|
cp -r ${title-sequences-src} $sourceRoot/data/sequence
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DDOWNLOAD_OBJECTS=OFF"
|
|
|
|
"-DDOWNLOAD_TITLE_SEQUENCES=OFF"
|
|
|
|
];
|
|
|
|
|
|
|
|
preFixup = "ln -s $out/share/openrct2 $out/bin/data";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An open source re-implementation of RollerCoaster Tycoon 2 (original game required)";
|
|
|
|
homepage = "https://openrct2.io/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2020-08-20 17:08:02 +00:00
|
|
|
maintainers = with maintainers; [ oxzi ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|