openrct2: add overrides for rct1/2 installation paths (#506337)

This commit is contained in:
Peder Bergebakken Sundt
2026-04-10 21:07:15 +00:00
committed by GitHub
+11
View File
@@ -25,12 +25,16 @@
libpthread-stubs,
libvorbis,
libzip,
makeWrapper,
nlohmann_json,
openssl,
pkg-config,
speexdsp,
zlib,
withDiscordRpc ? false,
# Paths to RCT1 and RCT2 installs can be specified to have them added as a wrapped argument
rct1Path ? null,
rct2Path ? null,
}:
let
@@ -75,6 +79,7 @@ stdenv.mkDerivation (finalAttrs: {
cmake
pkg-config
unzip
makeWrapper
];
buildInputs = [
@@ -140,6 +145,12 @@ stdenv.mkDerivation (finalAttrs: {
+ (versionCheck "TITLE_SEQUENCE" title-sequences-version)
);
postInstall = ''
wrapProgram $out/bin/openrct2 \
${lib.optionalString (rct1Path != null) "--add-flags '--rct1-data-path=\"${rct1Path}\"'"} \
${lib.optionalString (rct2Path != null) "--add-flags '--rct2-data-path=\"${rct2Path}\"'"}
'';
meta = {
description = "Open source re-implementation of RollerCoaster Tycoon 2 (original game required)";
homepage = "https://openrct2.io/";