nero-umu: init at 1.1.1
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
--- a/src/nerofs.cpp
|
||||
+++ b/src/nerofs.cpp
|
||||
@@ -173,31 +173,19 @@
|
||||
|
||||
QString NeroFS::GetIcoextract()
|
||||
{
|
||||
- // TODO: this is for flexibility in sandboxed environments(?)
|
||||
- // idk what the "good" path should be for Flatpak, so...
|
||||
- if(QDir("/usr/bin").exists("icoextract")) {
|
||||
- return "/usr/bin/icoextract";
|
||||
- } else return "";
|
||||
+ return QStandardPaths::findExecutable("icoextract");
|
||||
}
|
||||
|
||||
|
||||
QString NeroFS::GetIcoutils()
|
||||
{
|
||||
- // TODO: this is for flexibility in sandboxed environments(?)
|
||||
- // idk what the "good" path should be for Flatpak, so...
|
||||
- if(QDir("/usr/bin").exists("icotool")) {
|
||||
- return "/usr/bin/icotool";
|
||||
- } else return "";
|
||||
+ return QStandardPaths::findExecutable("icotool");
|
||||
}
|
||||
|
||||
|
||||
QString NeroFS::GetUmU()
|
||||
{
|
||||
- // TODO: this is for flexibility in sandboxed environments(?)
|
||||
- // idk what the "good" path should be for Flatpak, so...
|
||||
- if(QDir("/usr/bin").exists("umu-run")) {
|
||||
- return "/usr/bin/umu-run";
|
||||
- } else return "";
|
||||
+ return QStandardPaths::findExecutable("umu-run");
|
||||
}
|
||||
|
||||
QString NeroFS::GetWinetricks(const QString &runner)
|
||||
@@ -207,17 +195,13 @@
|
||||
return protonsPath.path() + '/' + runner + "/protonfixes/winetricks";
|
||||
else {
|
||||
// fall back to system winetricks
|
||||
- if(QDir("/usr/bin").exists("winetricks"))
|
||||
- return "/usr/bin/winetricks";
|
||||
- else return "";
|
||||
+ return QStandardPaths::findExecutable("winetricks");
|
||||
}
|
||||
} else if(QDir(protonsPath.path() + '/' + currentRunner + "/protonfixes").exists("winetricks"))
|
||||
return protonsPath.path() + '/' + currentRunner + "/protonfixes/winetricks";
|
||||
else {
|
||||
// fall back to system winetricks
|
||||
- if(QDir("/usr/bin").exists("winetricks"))
|
||||
- return "/usr/bin/winetricks";
|
||||
- else return "";
|
||||
+ return QStandardPaths::findExecutable("winetricks");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/src/neroprefixsettings.cpp
|
||||
+++ b/src/neroprefixsettings.cpp
|
||||
@@ -598,7 +598,7 @@
|
||||
tmpDir.mkdir("nero-manager");
|
||||
QProcess process;
|
||||
process.setWorkingDirectory(tmpDir.path()+"/nero-manager");
|
||||
- process.start("/usr/bin/curl", { "-o", "bridge.zip", "-L", "https://github.com/EnderIce2/rpc-bridge/releases/latest/download/bridge.zip" });
|
||||
+ process.start(QStandardPaths::findExecutable("curl"), { "-o", "bridge.zip", "-L", "https://github.com/EnderIce2/rpc-bridge/releases/latest/download/bridge.zip" });
|
||||
printf("Downloading Discord RPC Bridge...\n");
|
||||
|
||||
NeroPrefixSettingsWindow::blockSignals(true);
|
||||
@@ -0,0 +1,99 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkg-config,
|
||||
qt6,
|
||||
qt6Packages,
|
||||
icu,
|
||||
icoextract,
|
||||
icoutils,
|
||||
umu-launcher,
|
||||
winetricks,
|
||||
curl,
|
||||
mangohud,
|
||||
gamescope,
|
||||
gamemode,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "nero-umu";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SeongGino";
|
||||
repo = "Nero-umu";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-sX/Z/b5stauut8qg6IV/DdsCIkdx1N3+y1jwoXHr1LY=";
|
||||
};
|
||||
|
||||
#Replace quazip git submodule with pre-packaged quazip
|
||||
postUnpack = ''
|
||||
rmdir source/lib/quazip/
|
||||
ln -s ${qt6Packages.quazip.src} source/lib/quazip
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
qt6.wrapQtAppsHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qt6.qtbase
|
||||
qt6.qttools
|
||||
qt6.qt5compat
|
||||
qt6Packages.quazip
|
||||
icu
|
||||
];
|
||||
|
||||
runtimeDeps = [
|
||||
icoextract
|
||||
icoutils
|
||||
winetricks
|
||||
curl
|
||||
umu-launcher
|
||||
mangohud
|
||||
gamescope
|
||||
gamemode
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "NERO_QT_VERSION" "Qt6")
|
||||
];
|
||||
|
||||
#Fixes to be able to find binaries for nix
|
||||
patches = [
|
||||
./nerofs.patch
|
||||
./neroprefix.patch
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 "nero-umu" "$out/bin/nero-umu"
|
||||
for size in 32 48 64 128; do
|
||||
install -Dm644 "$src/img/ico/ico_"$size".png" "$out/share/icons/hicolor/"$size"x"$size"/apps/xyz.TOS.Nero.png"
|
||||
done
|
||||
install -Dm644 "$src/xyz.TOS.Nero.desktop" "$out/share/applications/xyz.TOS.Nero.desktop"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
qtWrapperArgs+=(
|
||||
--prefix PATH : ${lib.makeBinPath finalAttrs.runtimeDeps}
|
||||
)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/SeongGino/Nero-umu";
|
||||
description = "Fast and efficient Proton prefix runner and manager using umu as backend";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
mainProgram = "nero-umu";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with lib.maintainers; [
|
||||
ern775
|
||||
blghnks
|
||||
keenanweaver
|
||||
];
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user