Skip to content

Commit b1ae34c

Browse files
authored
mcpelauncher-client: fix hard-coded paths (NixOS#377734)
2 parents c425d06 + df24baa commit b1ae34c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkgs/by-name/mc/mcpelauncher-client/package.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
lib,
33
clangStdenv,
4+
stdenv,
45
fetchFromGitHub,
56
fetchpatch,
67
cmake,
@@ -18,6 +19,8 @@
1819
withQtWebview ? true,
1920
withQtErrorWindow ? true,
2021
fetchzip,
22+
zenity,
23+
xdg-utils,
2124
}:
2225

2326
# gcc doesn't support __has_feature
@@ -51,6 +54,16 @@ clangStdenv.mkDerivation (finalAttrs: {
5154
})
5255
];
5356

57+
# Path hard-coded paths.
58+
postPatch = lib.optionalString stdenv.isLinux ''
59+
substituteInPlace mcpelauncher-client/src/jni/main_activity.cpp \
60+
--replace-fail /usr/bin/xdg-open ${xdg-utils}/bin/xdg-open \
61+
--replace-fail /usr/bin/zenity ${zenity}/bin/zenity
62+
63+
substituteInPlace file-picker/src/file_picker_zenity.cpp \
64+
--replace-fail /usr/bin/zenity ${zenity}/bin/zenity
65+
'';
66+
5467
# FORTIFY_SOURCE breaks libc_shim and the project will fail to compile
5568
hardeningDisable = [ "fortify" ];
5669

0 commit comments

Comments
 (0)