mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
81 lines
1.7 KiB
Nix
81 lines
1.7 KiB
Nix
{ stdenv, fetchFromGitHub
|
|
, SDL2, cmake, curl, duktape, fontconfig, freetype, icu, jansson, libGLU
|
|
, libiconv, libpng, libpthreadstubs, libzip, openssl, pkgconfig, speexdsp, zlib
|
|
}:
|
|
|
|
let
|
|
version = "0.3.0";
|
|
|
|
openrct2-src = fetchFromGitHub {
|
|
owner = "OpenRCT2";
|
|
repo = "OpenRCT2";
|
|
rev = "v${version}";
|
|
sha256 = "0xs8pnn3lq30iy76pv42hywsrabapcrrkl597dhjafwh1xaxxj91";
|
|
};
|
|
|
|
objects-src = fetchFromGitHub {
|
|
owner = "OpenRCT2";
|
|
repo = "objects";
|
|
rev = "v1.0.16";
|
|
sha256 = "1xz50ghiqj9rm0m6d65j09ich6dlhyj36zah6zvmmzr4kg6svnk5";
|
|
};
|
|
|
|
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
|
|
duktape
|
|
fontconfig
|
|
freetype
|
|
icu
|
|
jansson
|
|
libGLU
|
|
libiconv
|
|
libpng
|
|
libpthreadstubs
|
|
libzip
|
|
openssl
|
|
speexdsp
|
|
zlib
|
|
];
|
|
|
|
postUnpack = ''
|
|
cp -r ${objects-src} $sourceRoot/data/object
|
|
cp -r ${title-sequences-src} $sourceRoot/data/sequence
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DDOWNLOAD_OBJECTS=OFF"
|
|
"-DDOWNLOAD_TITLE_SEQUENCES=OFF"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
preFixup = "ln -s $out/share/openrct2 $out/bin/data";
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "An open source re-implementation of RollerCoaster Tycoon 2 (original game required)";
|
|
homepage = "https://openrct2.io/";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ oxzi ];
|
|
};
|
|
}
|