Skip to content

Commit

Permalink
📦 Add tmux-rime
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Oct 9, 2024
1 parent 3a8cea3 commit 4a49a23
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ let
bash-prompt = callPackage ./pkgs/shells/bash/bash-prompt { };
undollar = callPackage ./pkgs/tools/misc/undollar { };
manpager = callPackage ./pkgs/tools/misc/manpager { };
tmux-rime = callPackage ./pkgs/tools/misc/tmux-rime { };

lua-prompt-style = callPackage ./pkgs/development/lua-modules/prompt-style { };
luajit-prompt-style = callPackage ./pkgs/development/lua-modules/prompt-style { luaPackages = pkgs.luajitPackages; };
Expand Down
39 changes: 39 additions & 0 deletions pkgs/tools/misc/tmux-rime/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{ lib
, stdenv
, xmake
, fetchFromGitHub
, unzip
, glib
, librime
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "tmux-rime";
version = "0.0.1";
src = fetchFromGitHub {
owner = "Freed-Wu";
repo = pname;
rev = version;
fetchSubmodules = false;
sha256 = "sha256-zZ6+sZhJW91/TiF6aR0n44jCj2iEkL+RzdEVTw6G9K8=";
};

nativeBuildInputs = [ glib.dev stdenv.cc unzip pkg-config ];
buildInputs = [ glib librime ];

buildPhase = ''
cc -otmux-rime *.c ''$(pkg-config --cflags --libs glib-2.0 rime)
'';

installPhase = ''
install -D tmux-rime -t $out/bin
'';

meta = with lib; {
homepage = "https://github.com/Freed-Wu/tmux-rime";
description = "rime for tmux";
license = licenses.gpl3;
maintainers = with maintainers; [ Freed-Wu ];
platforms = platforms.unix;
};
}

0 comments on commit 4a49a23

Please sign in to comment.