1 { lib, stdenv, fetchFromGitHub
29 openrct2-version = "0.4.2";
31 # Those versions MUST match the pinned versions within the CMakeLists.txt
32 # file. The REPLAYS repository from the CMakeLists.txt is not necessary.
33 objects-version = "1.3.5";
34 title-sequences-version = "0.4.0";
36 openrct2-src = fetchFromGitHub {
39 rev = "v${openrct2-version}";
40 sha256 = "sha256-38syOFZm0eGCI1vbJxG8truX5vuafwSG0lp2o499zUs=";
43 objects-src = fetchFromGitHub {
46 rev = "v${objects-version}";
47 sha256 = "sha256-S9fjgtb45vhRTWnYEgmIlKej5fGBtnhKOn35npmX70U=";
50 title-sequences-src = fetchFromGitHub {
52 repo = "title-sequences";
53 rev = "v${title-sequences-version}";
54 sha256 = "sha256-anqCZkhYoaxPu3MYCYSsFFngOmPp2wnx2MGb0hj6W5U=";
59 version = openrct2-version;
93 "-DDOWNLOAD_OBJECTS=OFF"
94 "-DDOWNLOAD_TITLE_SEQUENCES=OFF"
98 cp -r ${objects-src} $sourceRoot/data/object
99 cp -r ${title-sequences-src} $sourceRoot/data/sequence
103 # Verify that the correct version of each third party repository is used.
105 grep -q '^set(OBJECTS_VERSION "${objects-version}")$' CMakeLists.txt \
106 || (echo "OBJECTS_VERSION differs!"; exit 1)
107 grep -q '^set(TITLE_SEQUENCE_VERSION "${title-sequences-version}")$' CMakeLists.txt \
108 || (echo "TITLE_SEQUENCE_VERSION differs!"; exit 1)
111 preFixup = "ln -s $out/share/openrct2 $out/bin/data";
114 description = "Open source re-implementation of RollerCoaster Tycoon 2 (original game required)";
115 homepage = "https://openrct2.io/";
116 downloadPage = "https://github.com/OpenRCT2/OpenRCT2/releases";
117 license = licenses.gpl3Only;
118 platforms = platforms.linux;
119 maintainers = with maintainers; [ oxzi ];