diff options
author | ghostbuster91 <ghostbuster91@users.noreply.github.com> | 2022-02-27 21:34:45 +0100 |
---|---|---|
committer | ghostbuster91 <ghostbuster91@users.noreply.github.com> | 2022-04-03 13:04:03 +0200 |
commit | 3dc0287de026a5fc157839af35cb459760eb136f (patch) | |
tree | 8d49e557615bf58ad75bbcea8a646c14bd86c3e6 /pkgs/tools/misc/thumbs | |
parent | e46d0c5f523dc51527c29ff1a950ea170f7d408f (diff) |
thumbs: init at 0.7.1
Diffstat (limited to 'pkgs/tools/misc/thumbs')
-rw-r--r-- | pkgs/tools/misc/thumbs/default.nix | 23 | ||||
-rw-r--r-- | pkgs/tools/misc/thumbs/fix.patch | 13 |
2 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/misc/thumbs/default.nix b/pkgs/tools/misc/thumbs/default.nix new file mode 100644 index 0000000000000..60a1dce08c08f --- /dev/null +++ b/pkgs/tools/misc/thumbs/default.nix @@ -0,0 +1,23 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "thumbs"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "fcsonline"; + repo = "tmux-thumbs"; + rev = version; + sha256 = "sha256-PH1nscmVhxJFupS7dlbOb+qEwG/Pa/2P6XFIbR/cfaQ="; + }; + + cargoSha256 = "sha256-6htKiXMMyYRFefJzvDnmdx3CJ3XL8zONhGlV2wcbr9g="; + + cargoPatches = [ ./fix.patch ]; + meta = with lib; { + homepage = "https://github.com/fcsonline/tmux-thumbs"; + description = "A lightning fast version copy/pasting 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 new file mode 100644 index 0000000000000..e04d7db8598af --- /dev/null +++ b/pkgs/tools/misc/thumbs/fix.patch @@ -0,0 +1,13 @@ +diff --git a/src/swapper.rs b/src/swapper.rs +index 6cf1e89..bcb0969 100644 +--- a/src/swapper.rs ++++ b/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}", + active_pane_id = active_pane_id, + scroll_params = scroll_params, + height = self.active_pane_height.unwrap_or(i32::MAX), |