2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2017-11-27 09:44:18 +00:00
|
|
|
|
|
|
|
# To make use of this plugin, need to add
|
|
|
|
# programs.zsh.interactiveShellInit = ''
|
2019-01-02 14:29:56 +00:00
|
|
|
# source ${pkgs.zsh-command-time}/share/zsh/plugins/command-time/command-time.plugin.zsh
|
|
|
|
# ZSH_COMMAND_TIME_COLOR="yellow"
|
2017-11-27 09:44:18 +00:00
|
|
|
# ZSH_COMMAND_TIME_MIN_SECONDS=3
|
|
|
|
# ZSH_COMMAND_TIME_ECHO=1
|
|
|
|
# '';
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2018-07-12 06:45:54 +00:00
|
|
|
version = "2018-04-30";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "zsh-command-time";
|
2017-11-27 09:44:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "popstas";
|
|
|
|
repo = "zsh-command-time";
|
2018-07-12 06:45:54 +00:00
|
|
|
rev = "afb4a4c9ae7ce64ca9d4f334a79a25e46daad0aa";
|
|
|
|
sha256 = "1bvyjgz6bhgg1nwr56r50p6fblgah6yiql55pgm5abnn2h876fjq";
|
2017-11-27 09:44:18 +00:00
|
|
|
};
|
|
|
|
|
2022-05-06 18:39:28 +00:00
|
|
|
strictDeps = true;
|
2021-07-17 20:29:19 +00:00
|
|
|
dontUnpack = true;
|
2018-07-27 11:55:02 +00:00
|
|
|
|
2017-11-27 09:44:18 +00:00
|
|
|
installPhase = ''
|
2019-01-02 14:29:56 +00:00
|
|
|
install -Dm0444 $src/command-time.plugin.zsh --target-directory=$out/share/zsh/plugins/command-time
|
2017-11-27 09:44:18 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-11-27 09:44:18 +00:00
|
|
|
description = "Plugin that output time: xx after long commands";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/popstas/zsh-command-time";
|
2017-11-27 09:44:18 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|