Skip to content

Commit

Permalink
🔖 Bump tmux-rime
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Nov 5, 2024
1 parent 57c92c0 commit f0da3ca
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions pkgs/tools/misc/tmux-rime/default.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
{ lib
, stdenv
, xmake
, fetchFromGitHub
, unzip
, glib
, librime
# https://github.com/xmake-io/xmake/discussions/5699
, git
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "tmux-rime";
version = "0.0.1";
version = "0.0.3";
src = fetchFromGitHub {
owner = "Freed-Wu";
repo = pname;
rev = version;
fetchSubmodules = false;
sha256 = "sha256-zZ6+sZhJW91/TiF6aR0n44jCj2iEkL+RzdEVTw6G9K8=";
sha256 = "sha256-DCSeENxxXycCqQKv+8mPGy3sxF5CRHUPUaI9wRpEw8Q=";
};

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

postPatch = ''
substituteInPlace xmake.lua --replace "glib" "glib-2.0"
'';

configurePhase = ''
export HOME=$(mktemp -d)
xmake g --network=private
xmake f --verbose
'';

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

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

meta = with lib; {
Expand Down

0 comments on commit f0da3ca

Please sign in to comment.