about summary refs log tree commit diff
path: root/pkgs/applications/misc/openbangla-keyboard
diff options
context:
space:
mode:
authoréclairevoyant <848000+eclairevoyant@users.noreply.github.com>2023-12-26 16:07:37 -0500
committeréclairevoyant <848000+eclairevoyant@users.noreply.github.com>2023-12-27 17:26:37 -0500
commit52a0f4a7acc0f6445d501c6519d6357b7513419c (patch)
treebd8cb01cb19520dae8d928af2c461b4f3e56aace /pkgs/applications/misc/openbangla-keyboard
parentd1fcabefe1617c4dd295774692140b2018b9f9fc (diff)
fcitx5-openbangla-keyboard: fix runtime crash
Diffstat (limited to 'pkgs/applications/misc/openbangla-keyboard')
-rw-r--r--pkgs/applications/misc/openbangla-keyboard/default.nix18
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/applications/misc/openbangla-keyboard/default.nix b/pkgs/applications/misc/openbangla-keyboard/default.nix
index c0a514367af97..4b7e1ec8c16a9 100644
--- a/pkgs/applications/misc/openbangla-keyboard/default.nix
+++ b/pkgs/applications/misc/openbangla-keyboard/default.nix
@@ -11,6 +11,7 @@
 , ibus
 , qtbase
 , zstd
+, fetchpatch
 , withFcitx5Support ? false
 , withIbusSupport ? false
 }:
@@ -29,6 +30,15 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
+  patches = [
+    # prevents runtime crash when fcitx5-based IM attempts to look in /usr
+    (fetchpatch {
+      name = "use-CMAKE_INSTALL_PREFIX-for-loading-data.patch";
+      url = "https://github.com/OpenBangla/OpenBangla-Keyboard/commit/f402472780c29eaa6b4cc841a70289adf171462b.diff";
+      hash = "sha256-YahvtyOxe8F40Wfe+31C6fdmm197QN26/Q67oinOplk=";
+    })
+  ];
+
   nativeBuildInputs = [
     cmake
     pkg-config
@@ -65,13 +75,7 @@ stdenv.mkDerivation rec {
   cargoRoot = "src/engine/riti";
   postPatch = ''
     cp ${./Cargo.lock} ${cargoRoot}/Cargo.lock
-
-    substituteInPlace CMakeLists.txt \
-      --replace "/usr" "$out"
-
-    substituteInPlace src/shared/FileSystem.cpp \
-      --replace "/usr" "$out"
-  '';
+ '';
 
   meta = {
     isIbusEngine = withIbusSupport;