From 1c58afac2754de2085935d7f973a9247c7f35b62 Mon Sep 17 00:00:00 2001 From: Jademalo <386846+Jademalo@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:10:11 +0100 Subject: [PATCH] openrct2: add overrides for rct1/2 installation paths --- pkgs/by-name/op/openrct2/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/op/openrct2/package.nix b/pkgs/by-name/op/openrct2/package.nix index 485fe8258b63..a50dcec94865 100644 --- a/pkgs/by-name/op/openrct2/package.nix +++ b/pkgs/by-name/op/openrct2/package.nix @@ -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/";