From 82783be6316e8d56f6a75682278cfcc11baec64b Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Wed, 6 Nov 2024 13:22:53 +0800 Subject: [PATCH] :bug: Don't patch code about glib --- pkgs/tools/misc/tmux-rime/default.nix | 35 ++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/misc/tmux-rime/default.nix b/pkgs/tools/misc/tmux-rime/default.nix index 510636c..768dbcb 100644 --- a/pkgs/tools/misc/tmux-rime/default.nix +++ b/pkgs/tools/misc/tmux-rime/default.nix @@ -10,27 +10,40 @@ stdenv.mkDerivation rec { pname = "tmux-rime"; version = "0.0.3"; - src = fetchFromGitHub { - owner = "Freed-Wu"; - repo = pname; - rev = version; - fetchSubmodules = false; - sha256 = "sha256-DCSeENxxXycCqQKv+8mPGy3sxF5CRHUPUaI9wRpEw8Q="; - }; + srcs = [ + ( + fetchFromGitHub { + owner = "Freed-Wu"; + repo = pname; + rev = version; + name = pname; + sha256 = "sha256-DCSeENxxXycCqQKv+8mPGy3sxF5CRHUPUaI9wRpEw8Q="; + } + ) + ( + fetchFromGitHub { + owner = "xmake-io"; + repo = "xmake-repo"; + rev = "9e39ee6a9c9a4c43192b95b7efcc95ea1c79a28d"; + name = "xmake-repo"; + sha256 = "sha256-LNXxNJalnJ18T/1JY1b3OxWBT1QMEnJkur2WVYa44aM="; + } + ) + ]; + sourceRoot = "."; nativeBuildInputs = [ stdenv.cc unzip pkg-config xmake ]; buildInputs = [ glib.dev librime ]; - postPatch = '' - substituteInPlace xmake.lua --replace-quiet "glib" "glib-2.0" - ''; - # https://github.com/xmake-io/xmake/discussions/5699 configurePhase = '' export XMAKE_ROOT=y HOME=$PWD PATH=$HOME:$PATH echo -e "#!$SHELL\necho I am git" > $HOME/git chmod +x $HOME/git + install -d .xmake/repositories + ln -sf ../../xmake-repo .xmake/repositories + cd ${pname} xmake g --network=private xmake f --verbose '';