Commit 4911cf57 authored by Gliczy's avatar Gliczy
Browse files

mangohud: 0.7.1 -> 0.7.2

parent 7780e516
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -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;
+4 −3
Original line number Diff line number Diff line
@@ -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!";