lol

Merge pull request #314874 from Gliczy/mangohud

mangohud: 0.7.1 -> 0.7.2

authored by

Kira Bruneau and committed by
GitHub
09fff7dc e7c35fd0

+8 -13
+4 -10
pkgs/tools/graphics/mangohud/default.nix
··· 4 , fetchFromGitHub 5 , fetchurl 6 , substituteAll 7 - , fetchpatch 8 , coreutils 9 , curl 10 , glxinfo ··· 34 , gamescopeSupport ? true # build mangoapp and mangohudctl 35 , lowerBitnessSupport ? stdenv.hostPlatform.isx86_64 # Support 32 bit on 64bit 36 , nix-update-script 37 }: 38 39 let ··· 94 in 95 stdenv.mkDerivation (finalAttrs: { 96 pname = "mangohud"; 97 - version = "0.7.1"; 98 99 src = fetchFromGitHub { 100 owner = "flightlessmango"; 101 repo = "MangoHud"; 102 rev = "refs/tags/v${finalAttrs.version}"; 103 fetchSubmodules = true; 104 - hash = "sha256-Gnq+1j+PFbeipAfXGnTq7wZdVQeG9R9vLAKZnZj7Bvs="; 105 }; 106 107 outputs = [ "out" "doc" "man" ]; ··· 140 libdbus = dbus.lib; 141 inherit hwdata; 142 }) 143 - 144 - # Add dep_vulkan to mangoapp and test_amdgpu to fix build failure 145 - # TODO: Remove in next release 146 - (fetchpatch { 147 - url = "https://github.com/flightlessmango/MangoHud/commit/cba217ffaf93aea6acb4e59e3e46bf912f740ccf.patch"; 148 - hash = "sha256-1My4/EuSMpe3AFhhFOJr8rz/wnywp+BW+F4dSgxToe0="; 149 - }) 150 ]; 151 152 postPatch = '' ··· 202 glew 203 glfw 204 xorg.libXrandr 205 ]; 206 207 doCheck = true;
··· 4 , fetchFromGitHub 5 , fetchurl 6 , substituteAll 7 , coreutils 8 , curl 9 , glxinfo ··· 33 , gamescopeSupport ? true # build mangoapp and mangohudctl 34 , lowerBitnessSupport ? stdenv.hostPlatform.isx86_64 # Support 32 bit on 64bit 35 , nix-update-script 36 + , libxkbcommon 37 }: 38 39 let ··· 94 in 95 stdenv.mkDerivation (finalAttrs: { 96 pname = "mangohud"; 97 + version = "0.7.2"; 98 99 src = fetchFromGitHub { 100 owner = "flightlessmango"; 101 repo = "MangoHud"; 102 rev = "refs/tags/v${finalAttrs.version}"; 103 fetchSubmodules = true; 104 + hash = "sha256-cj/F/DWUDm2AHTJvHgkKa+KdIrfxPWLzI570Dp4VFhs="; 105 }; 106 107 outputs = [ "out" "doc" "man" ]; ··· 140 libdbus = dbus.lib; 141 inherit hwdata; 142 }) 143 ]; 144 145 postPatch = '' ··· 195 glew 196 glfw 197 xorg.libXrandr 198 + libxkbcommon 199 ]; 200 201 doCheck = true;
+4 -3
pkgs/tools/graphics/mangohud/hardcode-dependencies.patch
··· 12 return false; 13 } 14 diff --git a/src/logging.cpp b/src/logging.cpp 15 - index ca33ee3..90d3638 100644 16 --- a/src/logging.cpp 17 +++ b/src/logging.cpp 18 - @@ -26,7 +26,11 @@ string exec(string command) { 19 #endif 20 std::array<char, 128> buffer; 21 std::string result; 22 + 23 + char* originalPath = getenv("PATH"); 24 + setenv("PATH", "@path@", 1); 25 - std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"), pclose); 26 + setenv("PATH", originalPath, 1); 27 if (!pipe) { 28 return "popen failed!";
··· 12 return false; 13 } 14 diff --git a/src/logging.cpp b/src/logging.cpp 15 + index 7d4cb98..256128c 100644 16 --- a/src/logging.cpp 17 +++ b/src/logging.cpp 18 + @@ -27,8 +27,12 @@ string exec(string command) { 19 #endif 20 std::array<char, 128> buffer; 21 std::string result; 22 + 23 + char* originalPath = getenv("PATH"); 24 + setenv("PATH", "@path@", 1); 25 + auto deleter = [](FILE* ptr){ pclose(ptr); }; 26 + std::unique_ptr<FILE, decltype(deleter)> pipe(popen(command.c_str(), "r"), deleter); 27 + setenv("PATH", originalPath, 1); 28 if (!pipe) { 29 return "popen failed!";