mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 12:59:04 +02:00
mangohud: statically link spdlog
Works around bug in pressure-vessel where it wasn't including necessary vulkan layer dependencies defined through DT_RUNPATH in the sandbox. https://github.com/ValveSoftware/steam-runtime/issues/511
This commit is contained in:
parent
f310f24f0d
commit
2d6481a4fd
|
@ -27,7 +27,6 @@
|
|||
, vulkan-loader
|
||||
, libXNVCtrl
|
||||
, wayland
|
||||
, spdlog
|
||||
, glew
|
||||
, glfw
|
||||
, nlohmann_json
|
||||
|
@ -51,6 +50,27 @@ let
|
|||
hash = "sha256-bQC0QmkLalxdj4mDEdqvvOFtNwz2T1MpTDuMXGYeQ18=";
|
||||
};
|
||||
};
|
||||
|
||||
# Derived from subprojects/spdlog.wrap
|
||||
#
|
||||
# NOTE: We only statically link spdlog due to a bug in pressure-vessel:
|
||||
# https://github.com/ValveSoftware/steam-runtime/issues/511
|
||||
#
|
||||
# Once this fix is released upstream, we should switch back to using
|
||||
# the system provided spdlog
|
||||
spdlog = rec {
|
||||
version = "1.8.5";
|
||||
src = fetchFromGitHub {
|
||||
owner = "gabime";
|
||||
repo = "spdlog";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-D29jvDZQhPscaOHlrzGN1s7/mXlcsovjbqYpXd7OM50=";
|
||||
};
|
||||
patch = fetchurl {
|
||||
url = "https://wrapdb.mesonbuild.com/v2/spdlog_${version}-1/get_patch";
|
||||
sha256 = "sha256-PDjyddV5KxKGORECWUMp6YsXc3kks0T5gxKrCZKbdL4=";
|
||||
};
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "mangohud";
|
||||
version = "0.6.7-1";
|
||||
|
@ -69,7 +89,7 @@ in stdenv.mkDerivation rec {
|
|||
postUnpack = ''(
|
||||
cd "$sourceRoot/subprojects"
|
||||
cp -R --no-preserve=mode,ownership ${imgui.src} imgui-${imgui.version}
|
||||
unzip ${imgui.patch}
|
||||
cp -R --no-preserve=mode,ownership ${spdlog.src} spdlog-${spdlog.version}
|
||||
)'';
|
||||
|
||||
patches = [
|
||||
|
@ -112,11 +132,16 @@ in stdenv.mkDerivation rec {
|
|||
})
|
||||
];
|
||||
|
||||
postPatch = ''(
|
||||
cd subprojects
|
||||
unzip ${imgui.patch}
|
||||
unzip ${spdlog.patch}
|
||||
)'';
|
||||
|
||||
mesonFlags = [
|
||||
"-Duse_system_vulkan=enabled"
|
||||
"-Dvulkan_datadir=${vulkan-headers}/share"
|
||||
"-Dwith_wayland=enabled"
|
||||
"-Duse_system_spdlog=enabled"
|
||||
] ++ lib.optionals gamescopeSupport [
|
||||
"-Dmangoapp_layer=true"
|
||||
"-Dmangoapp=true"
|
||||
|
@ -140,7 +165,6 @@ in stdenv.mkDerivation rec {
|
|||
libX11
|
||||
libXNVCtrl
|
||||
wayland
|
||||
spdlog
|
||||
] ++ lib.optionals gamescopeSupport [
|
||||
glew
|
||||
glfw
|
||||
|
|
Loading…
Reference in a new issue