biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / graphics / mangohud / hardcode-dependencies.patch
blob4b7954a3ee5e76ac10661d59777aa1605e678877
1 diff --git a/src/dbus.cpp b/src/dbus.cpp
2 index 7379af1..4eef3fe 100644
3 --- a/src/dbus.cpp
4 +++ b/src/dbus.cpp
5 @@ -152,7 +152,7 @@ bool dbus_manager::get_media_player_metadata(metadata& meta, std::string name) {
8 bool dbus_manager::init_internal() {
9 - if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("libdbus-1.so.3")) {
10 + if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("@libdbus@/lib/libdbus-1.so.3")) {
11 SPDLOG_ERROR("Could not load libdbus-1.so.3");
12 return false;
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;
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!";
31 diff --git a/src/pci_ids.cpp b/src/pci_ids.cpp
32 index 002a843..5a6262b 100644
33 --- a/src/pci_ids.cpp
34 +++ b/src/pci_ids.cpp
35 @@ -24,11 +24,9 @@ static std::istream& get_uncommented_line(std::istream& is, std::string &line)
36 void parse_pciids()
38 std::ifstream file;
39 - file.open("/usr/share/hwdata/pci.ids");
40 + file.open("@hwdata@/share/hwdata/pci.ids");
41 if (file.fail()){
42 - file.open("/usr/share/misc/pci.ids");
43 - if (file.fail())
44 - SPDLOG_ERROR("can't find file pci.ids");
45 + SPDLOG_ERROR("can't find file pci.ids");
48 std::string line;