mangohud: 0.7.1 -> 0.7.2

This commit is contained in:
Gliczy 2024-05-26 17:36:34 +02:00
parent 7780e5160e
commit 4911cf572e
2 changed files with 8 additions and 13 deletions

@ -4,7 +4,6 @@
, fetchFromGitHub
, fetchurl
, substituteAll
, fetchpatch
, coreutils
, curl
, glxinfo
@ -34,6 +33,7 @@
, gamescopeSupport ? true # build mangoapp and mangohudctl
, lowerBitnessSupport ? stdenv.hostPlatform.isx86_64 # Support 32 bit on 64bit
, nix-update-script
, libxkbcommon
}:
let
@ -94,14 +94,14 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "mangohud";
version = "0.7.1";
version = "0.7.2";
src = fetchFromGitHub {
owner = "flightlessmango";
repo = "MangoHud";
rev = "refs/tags/v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-Gnq+1j+PFbeipAfXGnTq7wZdVQeG9R9vLAKZnZj7Bvs=";
hash = "sha256-cj/F/DWUDm2AHTJvHgkKa+KdIrfxPWLzI570Dp4VFhs=";
};
outputs = [ "out" "doc" "man" ];
@ -140,13 +140,6 @@ stdenv.mkDerivation (finalAttrs: {
libdbus = dbus.lib;
inherit hwdata;
})
# Add dep_vulkan to mangoapp and test_amdgpu to fix build failure
# TODO: Remove in next release
(fetchpatch {
url = "https://github.com/flightlessmango/MangoHud/commit/cba217ffaf93aea6acb4e59e3e46bf912f740ccf.patch";
hash = "sha256-1My4/EuSMpe3AFhhFOJr8rz/wnywp+BW+F4dSgxToe0=";
})
];
postPatch = ''
@ -202,6 +195,7 @@ stdenv.mkDerivation (finalAttrs: {
glew
glfw
xorg.libXrandr
libxkbcommon
];
doCheck = true;

@ -12,17 +12,18 @@ index 7379af1..4eef3fe 100644
return false;
}
diff --git a/src/logging.cpp b/src/logging.cpp
index ca33ee3..90d3638 100644
index 7d4cb98..256128c 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -26,7 +26,11 @@ string exec(string command) {
@@ -27,8 +27,12 @@ string exec(string command) {
#endif
std::array<char, 128> buffer;
std::string result;
+
+ char* originalPath = getenv("PATH");
+ setenv("PATH", "@path@", 1);
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"), pclose);
auto deleter = [](FILE* ptr){ pclose(ptr); };
std::unique_ptr<FILE, decltype(deleter)> pipe(popen(command.c_str(), "r"), deleter);
+ setenv("PATH", originalPath, 1);
if (!pipe) {
return "popen failed!";