From 3428238e9f00b0d8d75383b06a4fa7dfda3c6be8 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Thu, 18 Sep 2025 19:20:09 +0200 Subject: [PATCH 01/10] ogre-next: init at 3.0.0 Signed-off-by: Marcin Serwin --- pkgs/by-name/og/ogre-next/package.nix | 86 +++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 pkgs/by-name/og/ogre-next/package.nix diff --git a/pkgs/by-name/og/ogre-next/package.nix b/pkgs/by-name/og/ogre-next/package.nix new file mode 100644 index 000000000000..99e21f9fc2ac --- /dev/null +++ b/pkgs/by-name/og/ogre-next/package.nix @@ -0,0 +1,86 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch2, + + cmake, + ninja, + pkg-config, + + SDL2, + xorg, + libGL, + zlib, + freetype, + tinyxml, + openvr, + rapidjson, + zziplib, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "ogre-next"; + version = "3.0.0"; + + src = fetchFromGitHub { + owner = "OGRECave"; + repo = "ogre-next"; + tag = "v${finalAttrs.version}"; + hash = "sha256-nJkCGKl9+6gApVtqk5OZjTOJllAJIiBKuquTYvR4NPs="; + }; + + patches = [ + (fetchpatch2 { + # https://github.com/OGRECave/ogre-next/pull/542 + url = "https://github.com/OGRECave/ogre-next/commit/c1dad50e8510dea9d75d97b0ace33a870993895c.patch?full_index=1"; + hash = "sha256-JYsksDxcLrkHqlgdP3KdHlFuvYxNazlchPGoTXE9LYQ="; + }) + ]; + + nativeBuildInputs = [ + cmake + pkg-config + ninja + ]; + + buildInputs = [ + SDL2 + freetype + zziplib + zlib + tinyxml + openvr + rapidjson + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libGL + xorg.libX11 + xorg.libXaw + xorg.libXrandr + xorg.libXt + xorg.libxcb + ]; + + # TODO: Figure out Vulkan plugin deps + + cmakeFlags = [ + (lib.cmakeBool "OGRE_BUILD_COMPONENT_PLANAR_REFLECTIONS" true) + + # Use STB instead of freeimage since the latter is marked as insecure + (lib.cmakeBool "OGRE_CONFIG_ENABLE_FREEIMAGE" false) + (lib.cmakeBool "OGRE_CONFIG_ENABLE_STBI" true) + ]; + + meta = { + description = "3D Object-Oriented Graphics Rendering Engine"; + homepage = "https://www.ogre3d.org/"; + maintainers = with lib.maintainers; [ + marcin-serwin + ]; + platforms = lib.platforms.linux; + license = lib.licenses.mit; + + # build problems around NEON intrinsics + broken = stdenv.hostPlatform.isAarch64; + }; +}) From 5a32e16298e007442f91ed0f6fa4546ddf9a5ab5 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Thu, 18 Sep 2025 19:20:09 +0200 Subject: [PATCH 02/10] stuntrally: 2.7 -> 3.3 Signed-off-by: Marcin Serwin --- pkgs/games/stuntrally/default.nix | 95 +++++++++++-------- .../mygui-use-pkg-config-for-ogre-next.patch | 38 ++++++++ pkgs/games/stuntrally/mygui.nix | 65 +++++++++++++ ...untrally-init-data-dirs-to-nix-paths.patch | 26 +++++ ...ntrally-use-pkg-config-for-ogre-next.patch | 45 +++++++++ pkgs/top-level/all-packages.nix | 2 +- 6 files changed, 229 insertions(+), 42 deletions(-) create mode 100644 pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch create mode 100644 pkgs/games/stuntrally/mygui.nix create mode 100644 pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch create mode 100644 pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch diff --git a/pkgs/games/stuntrally/default.nix b/pkgs/games/stuntrally/default.nix index 656d4ca91510..4ab171a6d40f 100644 --- a/pkgs/games/stuntrally/default.nix +++ b/pkgs/games/stuntrally/default.nix @@ -2,87 +2,100 @@ lib, fetchFromGitHub, stdenv, + callPackage, cmake, boost, - ogre_13, - mygui, - ois, SDL2, - libX11, libvorbis, pkg-config, - makeWrapper, enet, - libXcursor, bullet, openal, - tinyxml, tinyxml-2, + rapidjson, + ogre-next, + ninja, + libX11, }: let - stuntrally_ogre = ogre_13.overrideAttrs (old: { - cmakeFlags = old.cmakeFlags ++ [ - "-DOGRE_NODELESS_POSITIONING=ON" - "-DOGRE_RESOURCEMANAGER_STRICT=0" - ]; - }); - stuntrally_mygui = mygui.override { - withOgre = true; - ogre = stuntrally_ogre; - }; + mygui = callPackage ./mygui.nix { }; in - stdenv.mkDerivation rec { pname = "stuntrally"; - version = "2.7"; + version = "3.3"; src = fetchFromGitHub { owner = "stuntrally"; - repo = "stuntrally"; - rev = version; - hash = "sha256-0Eh9ilIHSh/Uz8TuPnXxLQfy7KF7qqNXUgBXQUCz9ys="; + repo = "stuntrally3"; + tag = version; + hash = "sha256-BJMMsJ/ONZTpvXetaaHlgm6rih9oZmtJNBXv0IM855Y="; }; + tracks = fetchFromGitHub { owner = "stuntrally"; - repo = "tracks"; - rev = version; - hash = "sha256-fglm1FetFGHM/qGTtpxDb8+k2iAREn5DQR5GPujuLms="; + repo = "tracks3"; + tag = version; + hash = "sha256-nvIN5hIfTfnuJdlLNlmpmYo3WQhUxYWz14OFra/55w4="; }; - postPatch = '' - substituteInPlace config/*-default.cfg \ - --replace "screenshot_png = off" "screenshot_png = on" - substituteInPlace source/*/BaseApp_Create.cpp \ - --replace "Codec_FreeImage" "Codec_STBI" - ''; + patches = [ + ./stuntrally-use-pkg-config-for-ogre-next.patch + ./stuntrally-init-data-dirs-to-nix-paths.patch + ]; - preConfigure = '' - rmdir data/tracks - ln -s ${tracks}/ data/tracks + postPatch = '' + substituteInPlace bin/Release/plugins.cfg \ + --replace-fail "PluginFolder=." "PluginFolder=${ogre-next}/lib/OGRE/" + substituteInPlace src/vdrift/paths.cpp \ + --replace-fail "@GAME_DATA_DIR@" "$out/share/stuntrally3/data" \ + --replace-fail "@GAME_CONFIG_DIR@" "$out/share/stuntrally3/config" ''; nativeBuildInputs = [ cmake pkg-config - makeWrapper + ninja ]; + buildInputs = [ boost - stuntrally_ogre - stuntrally_mygui - ois + ogre-next + mygui + rapidjson SDL2 - libX11 libvorbis enet - libXcursor bullet openal - tinyxml tinyxml-2 + libX11 ]; + installPhase = '' + runHook preInstall + + pushd .. + + share_dir=$out/share/stuntrally3 + mkdir -p $share_dir + cp -r config $share_dir/config + cp bin/Release/plugins.cfg $share_dir/config + cp -r data $share_dir/data + cp -r ${tracks} $share_dir/data/tracks + + mkdir -p $out/bin + cp bin/Release/{sr-editor3,sr-translator,stuntrally3} $out/bin + + popd + + runHook postInstall + ''; + + passthru = { + inherit mygui; + }; + meta = { description = "Stunt Rally game with Track Editor, based on VDrift and OGRE"; homepage = "http://stuntrally.tuxfamily.org/"; diff --git a/pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch b/pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch new file mode 100644 index 000000000000..e5f0fc0d3cb5 --- /dev/null +++ b/pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch @@ -0,0 +1,38 @@ +diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake +index fcf7cc4..7239f20 100644 +--- a/CMake/Dependencies.cmake ++++ b/CMake/Dependencies.cmake +@@ -84,7 +84,10 @@ elseif(MYGUI_RENDERSYSTEM EQUAL 7) + endif() + elseif(MYGUI_RENDERSYSTEM EQUAL 8) + # Find OGRE +- find_package(OGRE_next) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(OGRE REQUIRED IMPORTED_TARGET GLOBAL OGRE) ++ pkg_check_modules(OGRE_HLMS REQUIRED IMPORTED_TARGET GLOBAL OGRE-Hlms) ++ set(OGRE_INCLUDE_DIR "${OGRE_INCLUDE_DIRS}") + macro_log_feature(OGRE_FOUND "ogre" "Support for the Ogre render system" "" TRUE "" "") + endif() + +diff --git a/Platforms/Ogre2/Ogre2Platform/CMakeLists.txt b/Platforms/Ogre2/Ogre2Platform/CMakeLists.txt +index c40cd8f..2647ae8 100644 +--- a/Platforms/Ogre2/Ogre2Platform/CMakeLists.txt ++++ b/Platforms/Ogre2/Ogre2Platform/CMakeLists.txt +@@ -1,6 +1,6 @@ + set (PROJECTNAME MyGUI.Ogre2Platform) + +-message(STATUS "Platform Ogre-next:" ${OGRE_NEXT}) ++message(STATUS "Platform Ogre-next: ${OGRE_HLMS_INCLUDE_DIRS}") + + include_directories( + include +@@ -8,8 +8,7 @@ include_directories( + ${OGRE_CONFIG_INCLUDE_DIR} + ${OGRE_INCLUDE_DIR} + ${OGRE_SOURCE_DIR} +- ${OGRE_NEXT}/Components/Hlms/Unlit/include +- ${OGRE_NEXT}/Components/Hlms/Common/include ++ ${OGRE_HLMS_INCLUDE_DIRS} + ) + + include(${PROJECTNAME}.list) diff --git a/pkgs/games/stuntrally/mygui.nix b/pkgs/games/stuntrally/mygui.nix new file mode 100644 index 000000000000..111d3fe2266d --- /dev/null +++ b/pkgs/games/stuntrally/mygui.nix @@ -0,0 +1,65 @@ +{ + stdenv, + lib, + fetchFromGitHub, + cmake, + pkg-config, + ninja, + boost, + freetype, + libuuid, + ois, + ogre-next, + libX11, +}: +stdenv.mkDerivation { + pname = "mygui"; + version = "0-unstable-2024-02-01"; + + __structuredAttrs = true; + strictDeps = true; + + src = fetchFromGitHub { + owner = "cryham"; + repo = "mygui-next"; + rev = "a1490ffe01d503c31a00d8277007ffcb27a4258e"; + hash = "sha256-R80rTsbmkYtrjIYqdYmbfciEM4rtEzLtsM4XfShJwns="; + }; + + patches = [ ./mygui-use-pkg-config-for-ogre-next.patch ]; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail 'cmake_minimum_required(VERSION 2.6)' \ + 'cmake_minimum_required(VERSION 3.10)' + ''; + + nativeBuildInputs = [ + cmake + pkg-config + ninja + ]; + + buildInputs = [ + boost + freetype + libuuid + ois + ogre-next + libX11 + ]; + + cmakeFlags = [ + (lib.cmakeBool "MYGUI_BUILD_DEMOS" false) + (lib.cmakeBool "MYGUI_BUILD_TOOLS" false) + (lib.cmakeBool "MYGUI_DONT_USE_OBSOLETE" true) + (lib.cmakeFeature "MYGUI_RENDERSYSTEM" "8") + ]; + + meta = { + description = "Library for creating GUIs for games and 3D applications (Stunt Rally fork)"; + homepage = "http://mygui.info/"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch b/pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch new file mode 100644 index 000000000000..f02c20842004 --- /dev/null +++ b/pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch @@ -0,0 +1,26 @@ +diff --git a/src/common/Main.cpp b/src/common/Main.cpp +index f63a5b8..8260bcf 100644 +--- a/src/common/Main.cpp ++++ b/src/common/Main.cpp +@@ -154,7 +154,7 @@ void MainEntryPoints::createSystems( + PATHS::UserConfigDir()+"/", + PATHS::CacheDir()+"/", + PATHS::GameConfigDir()+"/", +- String("./") ); ++ PATHS::GameConfigDir()+"/" ); + + app->mGraphicsSystem = graphicsSystem; + +diff --git a/src/vdrift/paths.cpp b/src/vdrift/paths.cpp +index 9122031..d06bb59 100755 +--- a/src/vdrift/paths.cpp ++++ b/src/vdrift/paths.cpp +@@ -145,6 +145,8 @@ void PATHS::Init(bool log_paths) + fs::path exe = execname(); // binary dir + game_bin = exe.parent_path().string(); + ++ game_data = "@GAME_DATA_DIR@"; ++ game_config = "@GAME_CONFIG_DIR@"; + + // Find game data dir and defaults config dir + char *datadir = getenv("STUNTRALLY3_DATA_ROOT"); diff --git a/pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch b/pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch new file mode 100644 index 000000000000..6271caaea3f8 --- /dev/null +++ b/pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch @@ -0,0 +1,45 @@ +diff --git a/CMake/DependenciesConfig.cmake b/CMake/DependenciesConfig.cmake +index aca28ea..76f4186 100644 +--- a/CMake/DependenciesConfig.cmake ++++ b/CMake/DependenciesConfig.cmake +@@ -7,11 +7,14 @@ find_package(Bullet REQUIRED) + find_package(enet REQUIRED) + find_package(MyGUI REQUIRED) + find_package(Ogg REQUIRED) +-find_package(OGRE REQUIRED) ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(OGRE REQUIRED IMPORTED_TARGET GLOBAL OGRE) ++pkg_check_modules(OGRE-Hlms REQUIRED IMPORTED_TARGET GLOBAL OGRE-Hlms) ++pkg_check_modules(OGRE-Overlay REQUIRED IMPORTED_TARGET GLOBAL OGRE-Overlay) + find_package(OpenAL REQUIRED) + find_package(RapidJSON REQUIRED) + find_package(SDL2 REQUIRED) + find_package(tinyxml2 REQUIRED) + find_package(Vorbis REQUIRED) + +-include(AddMissingTargets) +\ No newline at end of file ++include(AddMissingTargets) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d84ae0c..22c367d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -175,14 +175,16 @@ foreach( EXE ${EXE_LIST} ) + endif () + + target_link_libraries( +- ${EXE} ++ ${EXE} + PRIVATE + boost::boost + Bullet::Bullet + enet::enet + MyGUI::MyGUI + Ogg::ogg +- OGRE::OGRE ++ PkgConfig::OGRE ++ PkgConfig::OGRE-Hlms ++ PkgConfig::OGRE-Overlay + OpenAL::OpenAL + rapidjson + SDL2::SDL2 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6d24e7993433..d7c2af5b46f2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12905,7 +12905,7 @@ with pkgs; protonup-ng = with python3Packages; toPythonApplication protonup-ng; - stuntrally = callPackage ../games/stuntrally { boost = boost183; }; + stuntrally = callPackage ../games/stuntrally { }; the-powder-toy = callPackage ../by-name/th/the-powder-toy/package.nix { lua = lua5_2; From 5e88eb2014a61515a3ac21bfe642b0db35a095fd Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 21 Sep 2025 22:24:59 +0200 Subject: [PATCH 03/10] stuntrally: move to by-name Signed-off-by: Marcin Serwin --- .../st}/stuntrally/mygui-use-pkg-config-for-ogre-next.patch | 0 pkgs/{games => by-name/st}/stuntrally/mygui.nix | 0 .../default.nix => by-name/st/stuntrally/package.nix} | 0 .../st}/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch | 0 .../stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch | 0 pkgs/top-level/all-packages.nix | 2 -- 6 files changed, 2 deletions(-) rename pkgs/{games => by-name/st}/stuntrally/mygui-use-pkg-config-for-ogre-next.patch (100%) rename pkgs/{games => by-name/st}/stuntrally/mygui.nix (100%) rename pkgs/{games/stuntrally/default.nix => by-name/st/stuntrally/package.nix} (100%) rename pkgs/{games => by-name/st}/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch (100%) rename pkgs/{games => by-name/st}/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch (100%) diff --git a/pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch b/pkgs/by-name/st/stuntrally/mygui-use-pkg-config-for-ogre-next.patch similarity index 100% rename from pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch rename to pkgs/by-name/st/stuntrally/mygui-use-pkg-config-for-ogre-next.patch diff --git a/pkgs/games/stuntrally/mygui.nix b/pkgs/by-name/st/stuntrally/mygui.nix similarity index 100% rename from pkgs/games/stuntrally/mygui.nix rename to pkgs/by-name/st/stuntrally/mygui.nix diff --git a/pkgs/games/stuntrally/default.nix b/pkgs/by-name/st/stuntrally/package.nix similarity index 100% rename from pkgs/games/stuntrally/default.nix rename to pkgs/by-name/st/stuntrally/package.nix diff --git a/pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch b/pkgs/by-name/st/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch similarity index 100% rename from pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch rename to pkgs/by-name/st/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch diff --git a/pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch b/pkgs/by-name/st/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch similarity index 100% rename from pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch rename to pkgs/by-name/st/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d7c2af5b46f2..6817de5251ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12905,8 +12905,6 @@ with pkgs; protonup-ng = with python3Packages; toPythonApplication protonup-ng; - stuntrally = callPackage ../games/stuntrally { }; - the-powder-toy = callPackage ../by-name/th/the-powder-toy/package.nix { lua = lua5_2; }; From 46ac4772f684d251da70ee8b6b0ff3107b48b2f2 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 17 Jan 2026 09:24:39 +0100 Subject: [PATCH 04/10] stuntrally: update homepage Signed-off-by: Marcin Serwin --- pkgs/by-name/st/stuntrally/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/st/stuntrally/package.nix b/pkgs/by-name/st/stuntrally/package.nix index 4ab171a6d40f..fe8068848608 100644 --- a/pkgs/by-name/st/stuntrally/package.nix +++ b/pkgs/by-name/st/stuntrally/package.nix @@ -98,7 +98,7 @@ stdenv.mkDerivation rec { meta = { description = "Stunt Rally game with Track Editor, based on VDrift and OGRE"; - homepage = "http://stuntrally.tuxfamily.org/"; + homepage = "https://cryham.org/stuntrally/"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ pSub ]; platforms = lib.platforms.linux; From 25d4be3c4af90c3495e4b5072d07eea16f864710 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 17 Jan 2026 09:25:29 +0100 Subject: [PATCH 05/10] stuntrally: add meta.mainProgram Signed-off-by: Marcin Serwin --- pkgs/by-name/st/stuntrally/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/st/stuntrally/package.nix b/pkgs/by-name/st/stuntrally/package.nix index fe8068848608..1d4f8a87de7e 100644 --- a/pkgs/by-name/st/stuntrally/package.nix +++ b/pkgs/by-name/st/stuntrally/package.nix @@ -99,6 +99,7 @@ stdenv.mkDerivation rec { meta = { description = "Stunt Rally game with Track Editor, based on VDrift and OGRE"; homepage = "https://cryham.org/stuntrally/"; + mainProgram = "stuntrally3"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ pSub ]; platforms = lib.platforms.linux; From b337d1f34c0ce590795359aaeaa1cd7dfb2be420 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 17 Jan 2026 11:49:42 +0100 Subject: [PATCH 06/10] stuntrally: switch to finalAttrs --- pkgs/by-name/st/stuntrally/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/st/stuntrally/package.nix b/pkgs/by-name/st/stuntrally/package.nix index 1d4f8a87de7e..006391a14f03 100644 --- a/pkgs/by-name/st/stuntrally/package.nix +++ b/pkgs/by-name/st/stuntrally/package.nix @@ -21,21 +21,21 @@ let mygui = callPackage ./mygui.nix { }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "stuntrally"; version = "3.3"; src = fetchFromGitHub { owner = "stuntrally"; repo = "stuntrally3"; - tag = version; + tag = finalAttrs.version; hash = "sha256-BJMMsJ/ONZTpvXetaaHlgm6rih9oZmtJNBXv0IM855Y="; }; tracks = fetchFromGitHub { owner = "stuntrally"; repo = "tracks3"; - tag = version; + tag = finalAttrs.version; hash = "sha256-nvIN5hIfTfnuJdlLNlmpmYo3WQhUxYWz14OFra/55w4="; }; @@ -82,7 +82,7 @@ stdenv.mkDerivation rec { cp -r config $share_dir/config cp bin/Release/plugins.cfg $share_dir/config cp -r data $share_dir/data - cp -r ${tracks} $share_dir/data/tracks + cp -r ${finalAttrs.tracks} $share_dir/data/tracks mkdir -p $out/bin cp bin/Release/{sr-editor3,sr-translator,stuntrally3} $out/bin @@ -104,4 +104,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ pSub ]; platforms = lib.platforms.linux; }; -} +}) From f87cab852c70a72e3650c18d4a42a01ff37b0bff Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 17 Jan 2026 11:49:42 +0100 Subject: [PATCH 07/10] stuntrally: update meta.description Signed-off-by: Marcin Serwin --- pkgs/by-name/st/stuntrally/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/st/stuntrally/package.nix b/pkgs/by-name/st/stuntrally/package.nix index 006391a14f03..5215b97cbaf7 100644 --- a/pkgs/by-name/st/stuntrally/package.nix +++ b/pkgs/by-name/st/stuntrally/package.nix @@ -97,7 +97,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - description = "Stunt Rally game with Track Editor, based on VDrift and OGRE"; + description = "3D racing game with Sci-Fi elements and own Track Editor"; homepage = "https://cryham.org/stuntrally/"; mainProgram = "stuntrally3"; license = lib.licenses.gpl3Plus; From 826a9b2ccb1d3b77d696ad81fbcd699e9c5603e8 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 17 Jan 2026 11:58:35 +0100 Subject: [PATCH 08/10] stuntrally: enable strict deps Signed-off-by: Marcin Serwin --- pkgs/by-name/st/stuntrally/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/st/stuntrally/package.nix b/pkgs/by-name/st/stuntrally/package.nix index 5215b97cbaf7..204132e7deb1 100644 --- a/pkgs/by-name/st/stuntrally/package.nix +++ b/pkgs/by-name/st/stuntrally/package.nix @@ -52,6 +52,7 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "@GAME_CONFIG_DIR@" "$out/share/stuntrally3/config" ''; + strictDeps = true; nativeBuildInputs = [ cmake pkg-config From 29a8f35d1f46bcb03014772aacbc85ba1ecf8e89 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 17 Jan 2026 12:09:16 +0100 Subject: [PATCH 09/10] stuntrally: force X11 due to crashes on wayland Signed-off-by: Marcin Serwin --- pkgs/by-name/st/stuntrally/package.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/stuntrally/package.nix b/pkgs/by-name/st/stuntrally/package.nix index 204132e7deb1..fe08e88d83e1 100644 --- a/pkgs/by-name/st/stuntrally/package.nix +++ b/pkgs/by-name/st/stuntrally/package.nix @@ -8,6 +8,7 @@ SDL2, libvorbis, pkg-config, + makeWrapper, enet, bullet, openal, @@ -57,6 +58,7 @@ stdenv.mkDerivation (finalAttrs: { cmake pkg-config ninja + makeWrapper ]; buildInputs = [ @@ -85,8 +87,13 @@ stdenv.mkDerivation (finalAttrs: { cp -r data $share_dir/data cp -r ${finalAttrs.tracks} $share_dir/data/tracks - mkdir -p $out/bin - cp bin/Release/{sr-editor3,sr-translator,stuntrally3} $out/bin + for binary in sr-editor3 sr-translator stuntrally3 + do + install -Dm755 -t $out/bin bin/Release/$binary + # Force X11, otherwise fails with `OGRE EXCEPTION(9:UnimplementedException)` + wrapProgram $out/bin/$binary \ + --set SDL_VIDEODRIVER x11 + done popd From d0ca39ce8b913e14cfbf93d8ba7bc55c17ceb383 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 17 Jan 2026 12:37:15 +0100 Subject: [PATCH 10/10] stuntrally: install desktop files Signed-off-by: Marcin Serwin --- pkgs/by-name/st/stuntrally/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/st/stuntrally/package.nix b/pkgs/by-name/st/stuntrally/package.nix index fe08e88d83e1..5bbe921d5529 100644 --- a/pkgs/by-name/st/stuntrally/package.nix +++ b/pkgs/by-name/st/stuntrally/package.nix @@ -87,6 +87,9 @@ stdenv.mkDerivation (finalAttrs: { cp -r data $share_dir/data cp -r ${finalAttrs.tracks} $share_dir/data/tracks + install -Dm644 -t $out/share/icons/hicolor/512x512/apps data/gui/{stuntrally,sr-editor}.png + install -Dm644 -t $out/share/applications dist/{stuntrally3,sr-editor3}.desktop + for binary in sr-editor3 sr-translator stuntrally3 do install -Dm755 -t $out/bin bin/Release/$binary