tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
rimsort: init at 1.0.30
quartz
6 months ago
ff90ff19
7f4d0b06
+225
3 changed files
expand all
collapse all
unified
split
pkgs
by-name
ri
rimsort
package.nix
steam-run.patch
todds-path.patch
+182
pkgs/by-name/ri/rimsort/package.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
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
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
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
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
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}")