-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1351,6 +1351,13 @@ | |
githubId = 638836; | ||
name = "Andreas Rammhold"; | ||
}; | ||
andre4ik3 = { | ||
name = "andre4ik3"; | ||
email = "[email protected]"; | ||
matrix = "@andre4ik3:matrix.org"; | ||
github = "andre4ik3"; | ||
githubId = 62390580; | ||
}; | ||
andreasfelix = { | ||
email = "[email protected]"; | ||
github = "andreasfelix"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
fetchFromGitHub, | ||
lib, | ||
llvmPackages, | ||
cmake, | ||
ninja, | ||
pkg-config, | ||
gitMinimal, | ||
qt5, | ||
python3, | ||
}: | ||
|
||
llvmPackages.stdenv.mkDerivation (finalAttrs: rec { | ||
pname = "fex"; | ||
version = "2412"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "FEX-Emu"; | ||
repo = "FEX"; | ||
rev = "FEX-${version}"; | ||
hash = "sha256-btzb7OGa3M89wDn8AK/iocT3GLY1mB3cZ0iuWAyNIFc="; | ||
fetchSubmodules = true; | ||
}; | ||
|
||
patches = [ | ||
# This is a workaround to get FEX working with NixOS's slightly weird binfmt | ||
# infrastructure. | ||
./realpath.patch | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
ninja | ||
pkg-config | ||
gitMinimal | ||
qt5.wrapQtAppsHook | ||
llvmPackages.bintools | ||
|
||
(python3.withPackages ( | ||
pythonPackages: with pythonPackages; [ | ||
setuptools | ||
libclang | ||
] | ||
)) | ||
]; | ||
|
||
buildInputs = with qt5; [ | ||
qtbase | ||
qtdeclarative | ||
qtquickcontrols | ||
qtquickcontrols2 | ||
]; | ||
|
||
cmakeFlags = [ | ||
"-DCMAKE_BUILD_TYPE=Release" | ||
"-DUSE_LINKER=lld" | ||
"-DENABLE_LTO=True" | ||
"-DENABLE_ASSERTIONS=False" | ||
(lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck) | ||
]; | ||
|
||
strictDeps = true; | ||
doCheck = false; # broken on Apple silicon computers | ||
|
||
# Avoid wrapping anything other than FEXConfig, since the wrapped executables | ||
# don't seem to work when registered as binfmts. | ||
dontWrapQtApps = true; | ||
preFixup = '' | ||
wrapQtApp $out/bin/FEXConfig | ||
''; | ||
|
||
meta = { | ||
description = "A fast usermode x86 and x86-64 emulator for Arm64 Linux"; | ||
homepage = "https://fex-emu.com/"; | ||
platforms = [ "aarch64-linux" ]; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ andre4ik3 ]; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/Source/Common/FEXServerClient.cpp b/Source/Common/FEXServerClient.cpp | ||
index 424ecf0a0..501bcbac1 100644 | ||
--- a/Source/Common/FEXServerClient.cpp | ||
+++ b/Source/Common/FEXServerClient.cpp | ||
@@ -209,7 +209,13 @@ int ConnectToAndStartServer(char* InterpreterPath) { | ||
return -1; | ||
} | ||
|
||
- fextl::string FEXServerPath = FHU::Filesystem::ParentPath(InterpreterPath) + "/FEXServer"; | ||
+ char RealInterpreterPathBuf[PATH_MAX]; | ||
+ char *RealInterpreterPath = realpath(InterpreterPath, RealInterpreterPathBuf); | ||
+ if (!RealInterpreterPath) { | ||
+ LogMan::Msg::EFmt("realpath failed"); | ||
+ return -1; | ||
+ } | ||
+ fextl::string FEXServerPath = FHU::Filesystem::ParentPath(RealInterpreterPath) + "/FEXServer"; | ||
// Check if a local FEXServer next to FEXInterpreter exists | ||
// If it does then it takes priority over the installed one | ||
if (!FHU::Filesystem::Exists(FEXServerPath)) { |