15 , withFcitx5Support ? false
16 , withIbusSupport ? false
19 stdenv.mkDerivation rec {
20 pname = "openbangla-keyboard";
21 version = "unstable-2023-07-21";
23 src = fetchFromGitHub {
25 repo = "openbangla-keyboard";
26 # no upstream release in 3 years
27 # fcitx5 support was added over a year after the last release
28 rev = "780bd40eed16116222faff044bfeb61a07af158f";
29 hash = "sha256-4CR4lgHB51UvS/RLc0AEfIKJ7dyTCOfDrQdGLf9de8E=";
30 fetchSubmodules = true;
34 # prevents runtime crash when fcitx5-based IM attempts to look in /usr
36 name = "use-CMAKE_INSTALL_PREFIX-for-loading-data.patch";
37 url = "https://github.com/OpenBangla/OpenBangla-Keyboard/commit/f402472780c29eaa6b4cc841a70289adf171462b.diff";
38 hash = "sha256-YahvtyOxe8F40Wfe+31C6fdmm197QN26/Q67oinOplk=";
47 rustPlatform.cargoSetupHook
51 buildInputs = lib.optionals withFcitx5Support [
53 ] ++ lib.optionals withIbusSupport [
60 cargoDeps = rustPlatform.fetchCargoTarball {
63 cp ${./Cargo.lock} Cargo.lock
65 sourceRoot = "${src.name}/${cargoRoot}";
66 hash = "sha256-XMleyP2h1aBhtjXhuGHyU0BN+tuL12CGoj+kLY5uye0=";
69 cmakeFlags = lib.optionals withFcitx5Support [
71 ] ++ lib.optionals withIbusSupport [
75 cargoRoot = "src/engine/riti";
77 cp ${./Cargo.lock} ${cargoRoot}/Cargo.lock
81 isIbusEngine = withIbusSupport;
82 description = "An OpenSource, Unicode compliant Bengali Input Method";
83 mainProgram = "openbangla-gui";
84 homepage = "https://openbangla.github.io/";
85 license = lib.licenses.gpl3Plus;
86 maintainers = with lib.maintainers; [ eclairevoyant hqurve ];
87 platforms = lib.platforms.linux;
88 # never built on aarch64-linux since first introduction in nixpkgs
89 broken = stdenv.isLinux && stdenv.isAarch64;