2020-11-03 02:18:15 +00:00
|
|
|
{ stdenvNoCC, lib, fetchFromGitHub, installShellFiles }:
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2021-02-13 14:23:35 +00:00
|
|
|
pname = "zinit";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "3.12.0";
|
2020-11-03 02:18:15 +00:00
|
|
|
src = fetchFromGitHub {
|
2021-12-06 16:07:01 +00:00
|
|
|
owner = "zdharma-continuum";
|
2020-11-03 02:18:15 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-AiYK1pRFD4CGvBcQg9QwgFjc5Z564TVlWW0MzxoxdWU=";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
# adapted from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=zsh-zplugin-git
|
|
|
|
dontBuild = true;
|
2022-05-18 14:49:53 +00:00
|
|
|
strictDeps = true;
|
2020-11-03 02:18:15 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
installPhase = ''
|
|
|
|
outdir="$out/share/$pname"
|
|
|
|
|
|
|
|
cd "$src"
|
|
|
|
|
|
|
|
# Zplugin's source files
|
|
|
|
install -dm0755 "$outdir"
|
2023-07-15 17:15:38 +00:00
|
|
|
# Installing backward compatibility layer
|
|
|
|
install -m0644 zinit{,-side,-install,-autoload}.zsh "$outdir"
|
|
|
|
install -m0755 share/git-process-output.zsh "$outdir"
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
# Zplugin autocompletion
|
2021-02-13 14:23:35 +00:00
|
|
|
installShellCompletion --zsh _zinit
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
#TODO:Zplugin-module files
|
|
|
|
# find zmodules/ -type d -exec install -dm 755 "{}" "$outdir/{}" \;
|
|
|
|
# find zmodules/ -type f -exec install -m 744 "{}" "$outdir/{}" \;
|
|
|
|
|
|
|
|
'';
|
|
|
|
#TODO:doc output
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-19 01:06:50 +00:00
|
|
|
homepage = "https://github.com/zdharma-continuum/zinit";
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "Flexible zsh plugin manager";
|
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ pasqui23 sei40kr ];
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
}
|