rimsort: init at 1.0.30 (#418507)

authored by Sandro and committed by GitHub 30bdeaf6 0d00f23f

+401
+182
pkgs/by-name/ri/rimsort/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + python3Packages, 5 + fetchFromGitHub, 6 + fetchzip, 7 + makeBinaryWrapper, 8 + 9 + makeDesktopItem, 10 + replaceVars, 11 + 12 + todds, 13 + 14 + steam, 15 + }: 16 + let 17 + pname = "rimsort"; 18 + version = "1.0.30"; 19 + 20 + src = fetchFromGitHub { 21 + owner = "RimSort"; 22 + repo = "RimSort"; 23 + rev = "v${version}"; 24 + hash = "sha256-f1wYoBC0EbkvYNJHkVuoMukJZMY7eNjCIzJra7/hpLs="; 25 + fetchSubmodules = true; 26 + }; 27 + steamworksSrc = fetchzip { 28 + url = "https://web.archive.org/web/20250527013243/https://partner.steamgames.com/downloads/steamworks_sdk_162.zip"; # Steam sometimes requires auth to download. 29 + hash = "sha256-yDA92nGj3AKTNI4vnoLaa+7mDqupQv0E4YKRRUWqyZw="; 30 + }; 31 + 32 + steamfiles = python3Packages.buildPythonPackage { 33 + pname = "steamfiles"; 34 + inherit version; 35 + format = "setuptools"; 36 + 37 + src = "${src}/submodules/steamfiles"; 38 + dependencies = with python3Packages; [ 39 + protobuf 40 + protobuf3-to-dict 41 + ]; 42 + }; 43 + 44 + steam-run = 45 + (steam.override { 46 + privateTmp = false; 47 + }).run; 48 + in 49 + 50 + stdenv.mkDerivation { 51 + inherit pname; 52 + inherit version; 53 + 54 + unpackPhase = '' 55 + runHook preUnpack 56 + 57 + cp -r ${src} source 58 + chmod -R 755 source 59 + cp ${steamworksSrc}/redistributable_bin/linux64/libsteam_api.so source/ 60 + 61 + runHook postUnpack 62 + ''; 63 + 64 + sourceRoot = "source"; 65 + 66 + patches = [ 67 + (replaceVars ./todds-path.patch { inherit todds; }) 68 + (replaceVars ./steam-run.patch { inherit steam-run; }) 69 + ]; 70 + 71 + nativeBuildInputs = [ 72 + makeBinaryWrapper 73 + ]; 74 + 75 + buildInputs = 76 + [ 77 + todds 78 + steamfiles 79 + ] 80 + ++ builtins.attrValues { 81 + inherit (python3Packages) 82 + beautifulsoup4 83 + certifi 84 + chardet 85 + imageio 86 + loguru 87 + lxml 88 + msgspec 89 + natsort 90 + networkx 91 + packaging 92 + platformdirs 93 + psutil 94 + pygit2 95 + pygithub 96 + pyperclip 97 + pyside6 98 + requests 99 + sqlalchemy 100 + steam 101 + toposort 102 + watchdog 103 + xmltodict 104 + steamworkspy 105 + ; 106 + }; 107 + 108 + dontBuild = true; 109 + 110 + nativeCheckInputs = with python3Packages; [ 111 + pytestCheckHook 112 + pytest-cov-stub 113 + pytest-qt 114 + pytest-xvfb 115 + ]; 116 + 117 + doCheck = true; 118 + 119 + preCheck = '' 120 + export QT_DEBUG_PLUGINS=1 121 + export QT_QPA_PLATFORM=offscreen 122 + export HOME=$(mktemp -d) # Some tests require a writable directory 123 + ''; 124 + 125 + disabledTestPaths = [ 126 + # requires network 127 + "tests/models/metadata/test_metadata_factory.py" 128 + ]; 129 + 130 + pytestFlags = [ "--doctest-modules" ]; 131 + 132 + desktopItems = [ 133 + (makeDesktopItem { 134 + name = "RimSort"; 135 + desktopName = "RimSort"; 136 + exec = "rimsort"; 137 + icon = "io.github.rimsort.rimsort"; 138 + comment = "RimWorld Mod Manager"; 139 + categories = [ "Game" ]; 140 + }) 141 + ]; 142 + 143 + installPhase = '' 144 + runHook preInstall 145 + 146 + mkdir -p $out/lib/rimsort 147 + cp -r ./* $out/lib/rimsort/ 148 + 149 + mkdir -p $out/bin 150 + 151 + makeBinaryWrapper \ 152 + ${python3Packages.python.interpreter} \ 153 + $out/bin/rimsort \ 154 + --add-flags "-m app" \ 155 + --chdir $out/lib/rimsort \ 156 + --prefix PYTHONPATH : "$PYTHONPATH" \ 157 + --set RIMSORT_DISABLE_UPDATER 1 158 + 159 + install -D ./themes/default-icons/AppIcon_a.png $out/share/icons/hicolor/512x512/apps/io.github.rimsort.rimsort 160 + 161 + runHook postInstall 162 + ''; 163 + 164 + meta = { 165 + description = "Open source mod manager for the video game RimWorld"; 166 + homepage = "https://github.com/RimSort/RimSort"; 167 + license = with lib.licenses; [ 168 + gpl3Only 169 + # For libsteam_api.so 170 + ( 171 + unfreeRedistributable 172 + // { 173 + url = "https://partner.steamgames.com/documentation/sdk_access_agreement"; 174 + } 175 + ) 176 + ]; 177 + maintainers = with lib.maintainers; [ weirdrock ]; 178 + mainProgram = "rimsort"; 179 + # steamworksSrc is x86_64-linux only 180 + platforms = [ "x86_64-linux" ]; 181 + }; 182 + }
+26
pkgs/by-name/ri/rimsort/steam-run.patch
··· 1 + diff --git a/app/utils/generic.py b/app/utils/generic.py 2 + --- a/app/utils/generic.py 3 + +++ b/app/utils/generic.py 4 + @@ -255,7 +255,7 @@ 5 + popen_args.extend(args) 6 + p = subprocess.Popen(popen_args) 7 + else: 8 + - popen_args = [executable_path] 9 + + popen_args = ["@steam-run@/bin/steam-run", executable_path] 10 + popen_args.extend(args) 11 + 12 + if sys.platform == "win32": 13 + diff --git a/app/utils/steam/steamcmd/wrapper.py b/app/utils/steam/steamcmd/wrapper.py 14 + --- a/app/utils/steam/steamcmd/wrapper.py 15 + +++ b/app/utils/steam/steamcmd/wrapper.py 16 + @@ -316,8 +316,8 @@ 17 + script_output.write("\n".join(script)) 18 + runner.message(f"Compiled & using script: {script_path}") 19 + runner.execute( 20 + - self.steamcmd, 21 + - [f'+runscript "{script_path}"'], 22 + + "@steam-run@/bin/steam-run", 23 + + [self.steamcmd, f'+runscript "{script_path}"'], 24 + len(publishedfileids), 25 + ) 26 + else:
+17
pkgs/by-name/ri/rimsort/todds-path.patch
··· 1 + diff --git a/app/utils/todds/wrapper.py b/app/utils/todds/wrapper.py 2 + index a239fe0..3375b70 100644 3 + --- a/app/utils/todds/wrapper.py 4 + +++ b/app/utils/todds/wrapper.py 5 + @@ -66,11 +66,7 @@ class ToddsInterface: 6 + :param todds_arguments: list of todds args to be passed to the todds executable 7 + """ 8 + 9 + - if self.system == "Windows": 10 + - todds_executable = "todds.exe" 11 + - else: 12 + - todds_executable = "todds" 13 + - todds_exe_path = str(AppInfo().application_folder / "todds" / todds_executable) 14 + + todds_exe_path = "@todds@/bin/todds" 15 + logger.info("Checking for todds...") 16 + if os.path.exists(todds_exe_path): 17 + logger.debug(f"Found todds executable at: {todds_exe_path}")
+41
pkgs/development/python-modules/gevent-eventemitter/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + 6 + gevent, 7 + 8 + pytestCheckHook, 9 + 10 + setuptools, 11 + }: 12 + buildPythonPackage rec { 13 + pname = "gevent-eventemitter"; 14 + version = "2.1"; 15 + pyproject = true; 16 + 17 + src = fetchFromGitHub { 18 + owner = "rossengeorgiev"; 19 + repo = "gevent-eventemitter"; 20 + tag = "v${version}"; 21 + hash = "sha256-aW4OsQi3N5yAMdbTd8rxbb2qYMfFJBR4WQFIXvxpiMw="; 22 + }; 23 + 24 + build-system = [ setuptools ]; 25 + 26 + dependencies = [ 27 + gevent 28 + ]; 29 + 30 + nativeCheckInputs = [ 31 + pytestCheckHook 32 + ]; 33 + 34 + meta = { 35 + description = "EventEmitter using gevent"; 36 + homepage = "https://github.com/rossengeorgiev/gevent-eventemitter"; 37 + license = lib.licenses.mit; 38 + platforms = lib.platforms.linux; 39 + maintainers = with lib.maintainers; [ weirdrock ]; 40 + }; 41 + }
+50
pkgs/development/python-modules/steam/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + 6 + six, 7 + pycryptodomex, 8 + requests, 9 + urllib3, 10 + vdf, 11 + gevent, 12 + protobuf, 13 + gevent-eventemitter, 14 + cachetools, 15 + setuptools, 16 + }: 17 + buildPythonPackage rec { 18 + pname = "steam"; 19 + version = "1.4.4"; 20 + pyproject = true; 21 + 22 + src = fetchFromGitHub { 23 + owner = "ValvePython"; 24 + repo = "steam"; 25 + rev = "v${version}"; 26 + hash = "sha256-OY04GsX3KMPvpsQl8sUurzFyJu+JKpES8B0iD6Z5uyw="; 27 + }; 28 + 29 + build-system = [ setuptools ]; 30 + 31 + dependencies = [ 32 + six 33 + pycryptodomex 34 + requests 35 + urllib3 36 + vdf 37 + gevent 38 + protobuf 39 + gevent-eventemitter 40 + cachetools 41 + ]; 42 + 43 + meta = { 44 + description = "Python package for interacting with Steam"; 45 + homepage = "https://github.com/ValvePython/steam"; 46 + license = lib.licenses.mit; 47 + platforms = lib.platforms.linux; 48 + maintainers = with lib.maintainers; [ weirdrock ]; 49 + }; 50 + }
+79
pkgs/development/python-modules/steamworkspy/default.nix
··· 1 + { 2 + lib, 3 + fetchzip, 4 + stdenv, 5 + buildPythonPackage, 6 + fetchFromGitHub, 7 + 8 + setuptools, 9 + }: 10 + let 11 + rev = "26780de81b8c14d48fe8d757c642086f2af2a66b"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "philippj"; 15 + repo = "SteamworksPy"; 16 + inherit rev; 17 + hash = "sha256-nSGkEP6tny/Kv2+YjldFCYrLe1jnKOTa+w1/KCpSLsU="; 18 + 19 + }; 20 + steamworksSrc = fetchzip { 21 + url = "https://web.archive.org/web/20250527013243/https://partner.steamgames.com/downloads/steamworks_sdk_162.zip"; 22 + hash = "sha256-yDA92nGj3AKTNI4vnoLaa+7mDqupQv0E4YKRRUWqyZw="; 23 + }; 24 + 25 + library = stdenv.mkDerivation { 26 + pname = "steamworkspy-c"; 27 + version = rev; 28 + 29 + unpackPhase = '' 30 + runHook preUnpack 31 + 32 + cp -r ${src} source 33 + chmod -R 755 source 34 + cp -r ${steamworksSrc}/public/steam source/library/sdk/ 35 + cp ${steamworksSrc}/redistributable_bin/linux64/libsteam_api.so source/library/ 36 + 37 + runHook postUnpack 38 + ''; 39 + 40 + sourceRoot = "source/library"; 41 + 42 + installPhase = '' 43 + mkdir -p $out 44 + cp SteamworksPy.so $out/ 45 + ''; 46 + }; 47 + in 48 + 49 + buildPythonPackage { 50 + pname = "steamworkspy"; 51 + version = rev; 52 + pyproject = true; 53 + 54 + inherit src; 55 + 56 + build-system = [ setuptools ]; 57 + 58 + postInstall = '' 59 + cp ${library}/SteamworksPy.so $out/lib 60 + ''; 61 + 62 + meta = { 63 + description = "Python API system for Valve's Steamworks"; 64 + homepage = "https://github.com/philippj/SteamworksPy"; 65 + license = with lib.licenses; [ 66 + mit 67 + # For steamworks headers and libsteamapi.so 68 + ( 69 + unfreeRedistributable 70 + // { 71 + url = "https://partner.steamgames.com/documentation/sdk_access_agreement"; 72 + } 73 + ) 74 + ]; 75 + # steamworksSrc is x86_64-linux only 76 + platforms = [ "x86_64-linux" ]; 77 + maintainers = with lib.maintainers; [ weirdrock ]; 78 + }; 79 + }
+6
pkgs/top-level/python-packages.nix
··· 5757 5757 5758 5758 gevent = callPackage ../development/python-modules/gevent { }; 5759 5759 5760 + gevent-eventemitter = callPackage ../development/python-modules/gevent-eventemitter { }; 5761 + 5760 5762 gevent-socketio = callPackage ../development/python-modules/gevent-socketio { }; 5761 5763 5762 5764 gevent-websocket = callPackage ../development/python-modules/gevent-websocket { }; ··· 17247 17249 17248 17250 stdlibs = callPackage ../development/python-modules/stdlibs { }; 17249 17251 17252 + steam = callPackage ../development/python-modules/steam { }; 17253 + 17250 17254 steamodd = callPackage ../development/python-modules/steamodd { }; 17251 17255 17252 17256 steamship = callPackage ../development/python-modules/steamship { }; 17257 + 17258 + steamworkspy = callPackage ../development/python-modules/steamworkspy { }; 17253 17259 17254 17260 stem = callPackage ../development/python-modules/stem { }; 17255 17261