From daafc70f711124dcd71add0d5bdfefba15e079ed Mon Sep 17 00:00:00 2001 From: uima Date: Sun, 1 Sep 2024 19:03:19 +0800 Subject: [PATCH 1/3] tmuxPlugins.extrakto: unstable-2021-04-04 -> 0-unstable-2024-08-26 The Tmux plugin extrakto has added clipboard support for Wayland via `wl-copy`, so I added the `wl-clipboard` package as a dependency. The way extrakto executes Python scripts has also changed, so I directly changed the shebang of the Python script to the Python3 path to make sure the Python path is correctly set. --- pkgs/misc/tmux-plugins/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index 6343c5b1b9dd..2cb977572db7 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -216,22 +216,23 @@ in rec { extrakto = mkTmuxPlugin { pluginName = "extrakto"; - version = "unstable-2021-04-04"; + version = "0-unstable-2024-08-26"; src = fetchFromGitHub { owner = "laktak"; repo = "extrakto"; - rev = "de8ac3e8a9fa887382649784ed8cae81f5757f77"; - sha256 = "0mkp9r6mipdm7408w7ls1vfn6i3hj19nmir2bvfcp12b69zlzc47"; + rev = "bf9e666f2a6a8172ebe99fff61b574ba740cffc2"; + sha256 = "sha256-kIhJKgo1BDTeFyAPa//f/TrhPfV9Rfk9y4qMhIpCydk="; }; nativeBuildInputs = [ pkgs.makeWrapper ]; postInstall = '' - for f in extrakto.sh open.sh tmux-extrakto.sh; do - wrapProgram $target/scripts/$f \ - --prefix PATH : ${with pkgs; lib.makeBinPath ( - [ pkgs.fzf pkgs.python3 pkgs.xclip ] - )} - done + for f in extrakto.py extrakto_plugin.py; do + sed -i -e 's|#!/usr/bin/env python3|#!${pkgs.python3}/bin/python3|g' $target/$f + done + wrapProgram $target/scripts/open.sh \ + --prefix PATH : ${ with pkgs; lib.makeBinPath + [ fzf xclip wl-clipboard ] + } ''; meta = { homepage = "https://github.com/laktak/extrakto"; From 484832887ec1a9e00ddad20c863360c83a39b082 Mon Sep 17 00:00:00 2001 From: uima <43342441+uimataso@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:54:38 +0800 Subject: [PATCH 2/3] Apply suggestions from code review that use `patchShebangs` instead of `sed` Co-authored-by: Franz Pletz --- pkgs/misc/tmux-plugins/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index 2cb977572db7..059e3762bbbe 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -224,10 +224,9 @@ in rec { sha256 = "sha256-kIhJKgo1BDTeFyAPa//f/TrhPfV9Rfk9y4qMhIpCydk="; }; nativeBuildInputs = [ pkgs.makeWrapper ]; + buildInputs = [ pkgs.python3 ]; postInstall = '' - for f in extrakto.py extrakto_plugin.py; do - sed -i -e 's|#!/usr/bin/env python3|#!${pkgs.python3}/bin/python3|g' $target/$f - done + patchShebangs extrakto.py extrakto_plugin.py wrapProgram $target/scripts/open.sh \ --prefix PATH : ${ with pkgs; lib.makeBinPath From 921e8400dc7dcc3b716e32bdd9ddcba1dede0e55 Mon Sep 17 00:00:00 2001 From: uima <43342441+uimataso@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:59:58 +0800 Subject: [PATCH 3/3] fix: fix the updated version from 2024-08-25 to 2024-08-26 Due to the timezone, I misread the upstream commit as 2024-08-26, but it actually is 2024-08-25 --- pkgs/misc/tmux-plugins/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index 059e3762bbbe..ea08f49dd4e4 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -216,7 +216,7 @@ in rec { extrakto = mkTmuxPlugin { pluginName = "extrakto"; - version = "0-unstable-2024-08-26"; + version = "0-unstable-2024-08-25"; src = fetchFromGitHub { owner = "laktak"; repo = "extrakto";