about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Kozłowski <kubukoz@gmail.com>2024-02-11 18:23:35 +0100
committerGitHub <noreply@github.com>2024-02-11 18:23:35 +0100
commita498f11fa544d22b36e2a4cd1e3d22bb93a76151 (patch)
treeedfc333ce4cf0e31448619ba7cab25ffca80d014
parent3f8ecdfda510112379f79f222d17e8f54a361a61 (diff)
parent969511fba74e62e0fc01719ce848b265eb6642ac (diff)
Merge pull request #273798 from kingarrrt/tmux-thumbs
tmuxPlugins.tmux-thumbs: 0.7.1 -> 0.8.0
-rw-r--r--pkgs/misc/tmux-plugins/tmux-thumbs/default.nix24
-rw-r--r--pkgs/misc/tmux-plugins/tmux-thumbs/fix.patch27
-rw-r--r--pkgs/tools/misc/thumbs/default.nix8
-rw-r--r--pkgs/tools/misc/thumbs/fix.patch14
4 files changed, 29 insertions, 44 deletions
diff --git a/pkgs/misc/tmux-plugins/tmux-thumbs/default.nix b/pkgs/misc/tmux-plugins/tmux-thumbs/default.nix
index f55a2dbe7b60f..80aa40e866cb2 100644
--- a/pkgs/misc/tmux-plugins/tmux-thumbs/default.nix
+++ b/pkgs/misc/tmux-plugins/tmux-thumbs/default.nix
@@ -1,16 +1,11 @@
-{ lib, mkTmuxPlugin, fetchFromGitHub, thumbs, substituteAll }:
+{ mkTmuxPlugin, thumbs, substituteAll }:
 
-mkTmuxPlugin rec {
-  pluginName = "tmux-thumbs";
-  version = "0.7.1";
-  rtpFilePath = "tmux-thumbs.tmux";
+mkTmuxPlugin {
+
+  inherit (thumbs) version src meta;
 
-  src = fetchFromGitHub {
-    owner = "fcsonline";
-    repo = pluginName;
-    rev = version;
-    sha256 = "sha256-PH1nscmVhxJFupS7dlbOb+qEwG/Pa/2P6XFIbR/cfaQ=";
-  };
+  pluginName = thumbs.src.repo;
+  rtpFilePath = "tmux-thumbs.tmux";
 
   patches = [
     (substituteAll {
@@ -19,11 +14,4 @@ mkTmuxPlugin rec {
     })
   ];
 
-  meta = with lib; {
-    homepage = "https://github.com/fcsonline/tmux-thumbs";
-    description = "A lightning fast version of tmux-fingers written in Rust for copy pasting with vimium/vimperator like hints.";
-    license = licenses.mit;
-    platforms = platforms.unix;
-    maintainers = with maintainers; [ ghostbuster91 ];
-  };
 }
diff --git a/pkgs/misc/tmux-plugins/tmux-thumbs/fix.patch b/pkgs/misc/tmux-plugins/tmux-thumbs/fix.patch
index 326696ebc40a2..1e76b923e5e8a 100644
--- a/pkgs/misc/tmux-plugins/tmux-thumbs/fix.patch
+++ b/pkgs/misc/tmux-plugins/tmux-thumbs/fix.patch
@@ -1,19 +1,18 @@
-diff --git a/tmux-thumbs.sh b/tmux-thumbs.sh
-index 34dd528..8c05d54 100755
---- a/tmux-thumbs.sh
-+++ b/tmux-thumbs.sh
-@@ -1,22 +1,8 @@
+diff --git i/tmux-thumbs.sh w/tmux-thumbs.sh
+index 7e060e8..e7f0c57 100755
+--- i/tmux-thumbs.sh
++++ w/tmux-thumbs.sh
+@@ -1,22 +1,6 @@
  #!/usr/bin/env bash
  set -Eeu -o pipefail
  
--VERSION=$(grep 'version =' Cargo.toml | grep -oe "[0-9]\+.[0-9]\+.[0-9]\+")
--
- # Setup env variables to be compatible with compiled and bundled installations
- CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+-# Setup env variables to be compatible with compiled and bundled installations
+-CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 -RELEASE_DIR="${CURRENT_DIR}/target/release"
 -
 -THUMBS_BINARY="${RELEASE_DIR}/thumbs"
 -TMUX_THUMBS_BINARY="${RELEASE_DIR}/tmux-thumbs"
+-VERSION=$(grep 'version =' "${CURRENT_DIR}/Cargo.toml" | grep -o "\".*\"" | sed 's/"//g')
 -
 -if [ ! -f "$THUMBS_BINARY" ]; then
 -  tmux split-window "cd ${CURRENT_DIR} && bash ./tmux-thumbs-install.sh"
@@ -22,10 +21,11 @@ index 34dd528..8c05d54 100755
 -  tmux split-window "cd ${CURRENT_DIR} && bash ./tmux-thumbs-install.sh update"
 -  exit
 -fi
- 
+-
  function get-opt-value() {
    tmux show -vg "@thumbs-${1}" 2> /dev/null
-@@ -36,7 +22,7 @@ function get-opt-arg() {
+ }
+@@ -35,7 +19,7 @@ function get-opt-arg() {
    fi
  }
  
@@ -34,12 +34,9 @@ index 34dd528..8c05d54 100755
  
  function add-param() {
    local type opt arg
-@@ -51,4 +37,4 @@ add-param upcase-command string
+@@ -50,4 +34,4 @@ add-param upcase-command string
  add-param multi-command  string
  add-param osc52          boolean
  
 -"${TMUX_THUMBS_BINARY}" "${PARAMS[@]}" || true
 +@tmuxThumbsDir@/tmux-thumbs "${PARAMS[@]}" || true
-
-
-
diff --git a/pkgs/tools/misc/thumbs/default.nix b/pkgs/tools/misc/thumbs/default.nix
index 26b6c7d5f9469..e7f785b9e5bf0 100644
--- a/pkgs/tools/misc/thumbs/default.nix
+++ b/pkgs/tools/misc/thumbs/default.nix
@@ -2,22 +2,22 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "thumbs";
-  version = "0.7.1";
+  version = "0.8.0";
 
   src = fetchFromGitHub {
     owner = "fcsonline";
     repo = "tmux-thumbs";
     rev = version;
-    sha256 = "sha256-PH1nscmVhxJFupS7dlbOb+qEwG/Pa/2P6XFIbR/cfaQ=";
+    sha256 = "sha256-XMz1ZOTz2q1Dt4QdxG83re9PIsgvxTTkytESkgKxhGM=";
   };
 
-  cargoSha256 = "sha256-6htKiXMMyYRFefJzvDnmdx3CJ3XL8zONhGlV2wcbr9g=";
+  cargoSha256 = "sha256-PfTx6PcW5DESShfr9Ekhbq1asZ0xUGM4Vi9EwmoDv+s";
 
   patches = [ ./fix.patch ];
 
   meta = with lib; {
     homepage = "https://github.com/fcsonline/tmux-thumbs";
-    description = "A lightning fast version copy/pasting like vimium/vimperator";
+    description = "A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator";
     license = licenses.mit;
     maintainers = with maintainers; [ ghostbuster91 ];
   };
diff --git a/pkgs/tools/misc/thumbs/fix.patch b/pkgs/tools/misc/thumbs/fix.patch
index e04d7db8598af..35b7a9169165f 100644
--- a/pkgs/tools/misc/thumbs/fix.patch
+++ b/pkgs/tools/misc/thumbs/fix.patch
@@ -1,13 +1,13 @@
-diff --git a/src/swapper.rs b/src/swapper.rs
-index 6cf1e89..bcb0969 100644
---- a/src/swapper.rs
-+++ b/src/swapper.rs
+diff --git i/src/swapper.rs w/src/swapper.rs
+index c901f48..cbd278d 100644
+--- i/src/swapper.rs
++++ w/src/swapper.rs
 @@ -215,7 +215,7 @@ impl<'a> Swapper<'a> {
      };
-
+ 
      let pane_command = format!(
--        "tmux capture-pane -t {active_pane_id} -p{scroll_params} | tail -n {height} | {dir}/target/release/thumbs -f '%U:%H' -t {tmp} {args}; tmux swap-pane -t {active_pane_id}; {zoom_command} tmux wait-for -S {signal}",
-+        "tmux capture-pane -t {active_pane_id} -p{scroll_params} | tail -n {height} | {dir}/thumbs -f '%U:%H' -t {tmp} {args}; tmux swap-pane -t {active_pane_id}; {zoom_command} tmux wait-for -S {signal}",
+-        "tmux capture-pane -J -t {active_pane_id} -p{scroll_params} | tail -n {height} | {dir}/target/release/thumbs -f '%U:%H' -t {tmp} {args}; tmux swap-pane -t {active_pane_id}; {zoom_command} tmux wait-for -S {signal}",
++        "tmux capture-pane -J -t {active_pane_id} -p{scroll_params} | tail -n {height} | {dir}/thumbs -f '%U:%H' -t {tmp} {args}; tmux swap-pane -t {active_pane_id}; {zoom_command} tmux wait-for -S {signal}",
          active_pane_id = active_pane_id,
          scroll_params = scroll_params,
          height = self.active_pane_height.unwrap_or(i32::MAX),