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 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2018-07-12 07:45:54 +01:00
|
|
|
version = "2018-04-30";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "zsh-command-time";
|
2017-11-27 09:44:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "popstas";
|
|
|
|
repo = "zsh-command-time";
|
2018-07-12 07:45:54 +01:00
|
|
|
rev = "afb4a4c9ae7ce64ca9d4f334a79a25e46daad0aa";
|
|
|
|
sha256 = "1bvyjgz6bhgg1nwr56r50p6fblgah6yiql55pgm5abnn2h876fjq";
|
2017-11-27 09:44:18 +00:00
|
|
|
};
|
|
|
|
|
2018-07-27 12:55:02 +01:00
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
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 02:11:51 +01:00
|
|
|
homepage = "https://github.com/popstas/zsh-command-time";
|
2017-11-27 09:44:18 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|