1{ stdenvNoCC, lib, fetchFromGitHub, installShellFiles }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "zinit";
5 version = "3.11.0";
6 src = fetchFromGitHub {
7 owner = "zdharma-continuum";
8 repo = pname;
9 rev = "v${version}";
10 hash = "sha256-Gps7s26qqEjQPDhhSJr9u5SuRNRJnmayKfw45Ygjcd8=";
11 };
12 # adapted from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=zsh-zplugin-git
13 dontBuild = true;
14 strictDeps = true;
15 nativeBuildInputs = [ installShellFiles ];
16 installPhase = ''
17 outdir="$out/share/$pname"
18
19 cd "$src"
20
21 # Zplugin's source files
22 install -dm0755 "$outdir"
23 # Installing backward compatibility layer
24 install -m0644 zinit{,-side,-install,-autoload}.zsh "$outdir"
25 install -m0755 share/git-process-output.zsh "$outdir"
26
27 # Zplugin autocompletion
28 installShellCompletion --zsh _zinit
29
30 #TODO:Zplugin-module files
31 # find zmodules/ -type d -exec install -dm 755 "{}" "$outdir/{}" \;
32 # find zmodules/ -type f -exec install -m 744 "{}" "$outdir/{}" \;
33
34 '';
35 #TODO:doc output
36
37 meta = with lib; {
38 homepage = "https://github.com/zdharma-continuum/zinit";
39 description = "Flexible zsh plugin manager";
40 license = licenses.mit;
41 maintainers = with maintainers; [ pasqui23 sei40kr ];
42 };
43}