tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
simple64: init at 2024.09.1
TomaSajt
1 year ago
ca5dd27a
ae815cee
+153
3 changed files
expand all
collapse all
unified
split
pkgs
by-name
si
simple64
add-official-server-error-message.patch
dont-use-vosk-and-discord.patch
package.nix
+15
pkgs/by-name/si/simple64/add-official-server-error-message.patch
···
1
1
+
diff --git a/simple64-gui/netplay/joinroom.cpp b/simple64-gui/netplay/joinroom.cpp
2
2
+
index 3b5c34e..68b46f2 100644
3
3
+
--- a/simple64-gui/netplay/joinroom.cpp
4
4
+
+++ b/simple64-gui/netplay/joinroom.cpp
5
5
+
@@ -308,7 +308,9 @@ void JoinRoom::processTextMessage(QString message)
6
6
+
}
7
7
+
else
8
8
+
{
9
9
+
- msgBox.setText(json.value("message").toString());
10
10
+
+ QString msg = json.value("message").toString();
11
11
+
+ if(msg == "Bad authentication code") msg += "<br>Note: using the official netplay servers is not allowed on unofficial builds.<br>You can host your own server with `simple64-netplay-server`";
12
12
+
+ msgBox.setText(msg);
13
13
+
msgBox.exec();
14
14
+
}
15
15
+
}
+37
pkgs/by-name/si/simple64/dont-use-vosk-and-discord.patch
···
1
1
+
diff --git a/build.sh b/build.sh
2
2
+
index 254a90d..e2d26cf 100644
3
3
+
--- a/build.sh
4
4
+
+++ b/build.sh
5
5
+
@@ -77,7 +77,7 @@ cmake -G Ninja -DCMAKE_BUILD_TYPE="${RELEASE_TYPE}" ..
6
6
+
cmake --build .
7
7
+
cp simple64-video-parallel.* "${install_dir}"
8
8
+
9
9
+
-if [[ ! -d "${base_dir}/discord" ]]; then
10
10
+
+if false; then
11
11
+
echo "Downloading Discord SDK"
12
12
+
mkdir -p "${base_dir}/discord"
13
13
+
cd "${base_dir}/discord"
14
14
+
@@ -86,7 +86,7 @@ if [[ ! -d "${base_dir}/discord" ]]; then
15
15
+
rm discord_game_sdk.zip
16
16
+
fi
17
17
+
18
18
+
-if [[ ! -d "${base_dir}/vosk" ]]; then
19
19
+
+if false; then
20
20
+
mkdir -p "${base_dir}/vosk"
21
21
+
cd "${base_dir}/vosk"
22
22
+
if [[ ${UNAME} == *"MINGW64"* ]]; then
23
23
+
@@ -156,14 +156,6 @@ if [[ ${UNAME} == *"MINGW64"* ]]; then
24
24
+
cp -v "${base_dir}/7z/x64/7za.exe" "${install_dir}"
25
25
+
cp -v "${base_dir}/discord/lib/x86_64/discord_game_sdk.dll" "${install_dir}"
26
26
+
cp -v "${base_dir}/vosk/libvosk.dll" "${install_dir}/vosk.dll"
27
27
+
-else
28
28
+
- cp "${base_dir}/vosk/libvosk.so" "${install_dir}"
29
29
+
- if [[ "${PLATFORM}" == "aarch64" ]]; then
30
30
+
- my_os=linux_aarch64
31
31
+
- else
32
32
+
- my_os=linux_x86_64
33
33
+
- cp "${base_dir}/discord/lib/x86_64/discord_game_sdk.so" "${install_dir}/libdiscord_game_sdk.so"
34
34
+
- fi
35
35
+
fi
36
36
+
37
37
+
if [[ "$1" == "zip" ]]; then
+101
pkgs/by-name/si/simple64/package.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
stdenv,
4
4
+
fetchFromGitHub,
5
5
+
fetchurl,
6
6
+
writeShellScriptBin,
7
7
+
cmake,
8
8
+
ninja,
9
9
+
pkg-config,
10
10
+
makeWrapper,
11
11
+
zlib,
12
12
+
libpng,
13
13
+
SDL2,
14
14
+
SDL2_net,
15
15
+
hidapi,
16
16
+
qt6,
17
17
+
vulkan-loader,
18
18
+
}:
19
19
+
20
20
+
let
21
21
+
cheats-json = fetchurl {
22
22
+
url = "https://raw.githubusercontent.com/simple64/cheat-parser/87963b7aca06e0d4632b66bc5ffe7d6b34060f4f/cheats.json";
23
23
+
hash = "sha256-rS/4Mdi+18C2ywtM5nW2XaJkC1YnKZPc4YdQ3mCfESU=";
24
24
+
};
25
25
+
in
26
26
+
stdenv.mkDerivation (finalAttrs: {
27
27
+
pname = "simple64";
28
28
+
version = "2024.09.1";
29
29
+
30
30
+
src = fetchFromGitHub {
31
31
+
owner = "simple64";
32
32
+
repo = "simple64";
33
33
+
rev = "refs/tags/v${finalAttrs.version}";
34
34
+
hash = "sha256-t3V7mvHlCP8cOvizR3N9DiCofnSvSHI6U0iXXkaMb34=";
35
35
+
};
36
36
+
37
37
+
patches = [
38
38
+
./dont-use-vosk-and-discord.patch
39
39
+
./add-official-server-error-message.patch
40
40
+
];
41
41
+
42
42
+
postPatch = ''
43
43
+
cp ${cheats-json} cheats.json
44
44
+
'';
45
45
+
46
46
+
stictDeps = true;
47
47
+
48
48
+
nativeBuildInputs = [
49
49
+
qt6.wrapQtAppsHook
50
50
+
cmake
51
51
+
ninja
52
52
+
pkg-config
53
53
+
makeWrapper
54
54
+
# fake git command for version info generator
55
55
+
(writeShellScriptBin "git" "echo ${finalAttrs.src.rev}")
56
56
+
];
57
57
+
58
58
+
buildInputs = [
59
59
+
zlib
60
60
+
libpng
61
61
+
SDL2
62
62
+
SDL2_net
63
63
+
hidapi
64
64
+
qt6.qtbase
65
65
+
qt6.qtwebsockets
66
66
+
];
67
67
+
68
68
+
dontUseCmakeConfigure = true;
69
69
+
70
70
+
dontWrapQtApps = true;
71
71
+
72
72
+
buildPhase = ''
73
73
+
runHook preInstall
74
74
+
75
75
+
sh build.sh
76
76
+
77
77
+
runHook postInstall
78
78
+
'';
79
79
+
80
80
+
installPhase = ''
81
81
+
runHook preInstall
82
82
+
83
83
+
mkdir -p $out/share/simple64 $out/bin
84
84
+
cp -r simple64/* $out/share/simple64
85
85
+
86
86
+
makeWrapper $out/share/simple64/simple64-gui $out/bin/simple64-gui \
87
87
+
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]} \
88
88
+
"''${qtWrapperArgs[@]}"
89
89
+
90
90
+
runHook postInstall
91
91
+
'';
92
92
+
93
93
+
meta = {
94
94
+
description = "Easy to use N64 emulator";
95
95
+
homepage = "https://simple64.github.io";
96
96
+
license = lib.licenses.gpl3Only;
97
97
+
mainProgram = "simple64-gui";
98
98
+
maintainers = with lib.maintainers; [ tomasajt ];
99
99
+
platforms = lib.platforms.linux;
100
100
+
};
101
101
+
})