summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorCharles Hall <charles@computer.surgery>2023-09-23 12:02:52 -0700
committerCharles Hall <charles@computer.surgery>2023-09-27 07:36:54 -0700
commit88ee77c4ec73e138362d292310a29ade8faa8eb2 (patch)
tree3cb1e3c2b3dd7430112f1a15cc38cb61426f14e8 /pkgs/tools
parent7ca0ac08596bd6d8f28b662084a58f71c44cf007 (diff)
downloadnixpkgs-88ee77c4ec73e138362d292310a29ade8faa8eb2.tar
nixpkgs-88ee77c4ec73e138362d292310a29ade8faa8eb2.tar.gz
nixpkgs-88ee77c4ec73e138362d292310a29ade8faa8eb2.tar.bz2
nixpkgs-88ee77c4ec73e138362d292310a29ade8faa8eb2.tar.lz
nixpkgs-88ee77c4ec73e138362d292310a29ade8faa8eb2.tar.xz
nixpkgs-88ee77c4ec73e138362d292310a29ade8faa8eb2.tar.zst
nixpkgs-88ee77c4ec73e138362d292310a29ade8faa8eb2.zip
mangohud: 0.6.9-1 -> 0.7.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/graphics/mangohud/default.nix14
-rw-r--r--pkgs/tools/graphics/mangohud/preload-nix-workaround.patch16
2 files changed, 13 insertions, 17 deletions
diff --git a/pkgs/tools/graphics/mangohud/default.nix b/pkgs/tools/graphics/mangohud/default.nix
index a6209e6f3a0..210afcf5113 100644
--- a/pkgs/tools/graphics/mangohud/default.nix
+++ b/pkgs/tools/graphics/mangohud/default.nix
@@ -15,6 +15,7 @@
 , mangohud32
 , addOpenGLRunpath
 , appstream
+, git
 , glslang
 , mako
 , meson
@@ -78,14 +79,14 @@ let
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "mangohud";
-  version = "0.6.9-1";
+  version = "0.7.0";
 
   src = fetchFromGitHub {
     owner = "flightlessmango";
     repo = "MangoHud";
     rev = "refs/tags/v${finalAttrs.version}";
     fetchSubmodules = true;
-    hash = "sha256-AX4m1XZ+yXp74E3slFGyI3CGu2eYU+eXNN2EY+ivdfk=";
+    hash = "sha256-KkMN7A3AcS/v+b9GCs0pI6MBBk3WwOMciaoiBzL5xOQ=";
   };
 
   outputs = [ "out" "doc" "man" ];
@@ -123,13 +124,6 @@ stdenv.mkDerivation (finalAttrs: {
       libdbus = dbus.lib;
       inherit hwdata;
     })
-
-    # Pull gcc-13 build fix for nissing <cstdint>
-    (fetchpatch {
-      name = "gcc-13.patch";
-      url = "https://github.com/flightlessmango/MangoHud/commit/3f8f036ee8773ae1af23dd0848b6ab487b5ac7de.patch";
-      hash = "sha256-qbNywAXAStGiVZ1LA5qZyNp4n28iNUuE4N69zXv2gmM=";
-    })
   ];
 
   postPatch = ''
@@ -139,6 +133,7 @@ stdenv.mkDerivation (finalAttrs: {
       ] ++ lib.optionals lowerBitnessSupport [
         mangohud32
       ])} \
+      --subst-var-by version "${finalAttrs.version}" \
       --subst-var-by dataDir ${placeholder "out"}/share
 
     (
@@ -160,6 +155,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   nativeBuildInputs = [
     addOpenGLRunpath
+    git
     glslang
     mako
     meson
diff --git a/pkgs/tools/graphics/mangohud/preload-nix-workaround.patch b/pkgs/tools/graphics/mangohud/preload-nix-workaround.patch
index e360d8c1876..f38e1703973 100644
--- a/pkgs/tools/graphics/mangohud/preload-nix-workaround.patch
+++ b/pkgs/tools/graphics/mangohud/preload-nix-workaround.patch
@@ -1,24 +1,24 @@
 diff --git a/bin/mangohud.in b/bin/mangohud.in
-index f975224..24936eb 100755
+index 6c3c6e8..8847cdc 100755
 --- a/bin/mangohud.in
 +++ b/bin/mangohud.in
-@@ -8,16 +8,18 @@ if [ "$#" -eq 0 ]; then
+@@ -8,10 +8,10 @@ if [ "$#" -eq 0 ]; then
  	exit 1
  fi
  
--MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud.so"
-+MANGOHUD_LIB_NAME="libMangoHud.so"
+-MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_opengl.so"
++MANGOHUD_LIB_NAME="libMangoHud_opengl.so"
  
  if [ "$1" = "--dlsym" ]; then
- 	MANGOHUD_DLSYM=1
 -	MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
 +	MANGOHUD_LIB_NAME="libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}"
  	shift
  fi
  
- # Preload using the plain filenames of the libs, the dynamic linker will
- # figure out whether the 32 or 64 bit version should be used
- LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}${MANGOHUD_LIB_NAME}"
+@@ -31,5 +31,7 @@ case ":${LD_PRELOAD-}:" in
+         LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}${MANGOHUD_LIB_NAME}"
+ esac
+ 
 +LD_LIBRARY_PATH="@libraryPath@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
 +XDG_DATA_DIRS="@dataDir@${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"