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