nixpkgs/pkgs/shells/zsh/zinit/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.2 KiB
Nix
Raw Normal View History

2020-06-14 13:28:27 +02:00
{ stdenvNoCC, lib, fetchFromGitHub, installShellFiles }:
2021-01-30 00:56:55 +01:00
2020-06-14 13:28:27 +02:00
stdenvNoCC.mkDerivation rec {
2021-01-30 00:56:55 +01:00
pname = "zinit";
version = "3.7";
2020-06-14 13:28:27 +02:00
src = fetchFromGitHub {
owner = "zdharma-continuum";
2020-06-14 13:28:27 +02:00
repo = pname;
rev = "v${version}";
2021-01-30 00:56:55 +01:00
hash = "sha256-B+cTGz+U8MR22l6xXdRAAjDr+ulCk+CJ9GllFMK0axE=";
2020-06-14 13:28:27 +02:00
};
# adapted from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=zsh-zplugin-git
dontBuild = true;
2022-05-06 20:39:28 +02:00
strictDeps = true;
2020-06-14 13:28:27 +02:00
nativeBuildInputs = [ installShellFiles ];
installPhase = ''
outdir="$out/share/$pname"
cd "$src"
# Zplugin's source files
install -dm0755 "$outdir"
2021-01-30 00:56:55 +01:00
# Installing also backward compatibility layer
install -m0644 z{plugin,init}{,-side,-install,-autoload}.zsh "$outdir"
2020-06-14 13:28:27 +02:00
install -m0755 git-process-output.zsh "$outdir"
# Zplugin autocompletion
2021-01-30 00:56:55 +01:00
installShellCompletion --zsh _zinit
2020-06-14 13:28:27 +02: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; {
homepage = "https://github.com/zdharma-continuum/zinit";
2020-06-14 13:28:27 +02:00
description = "Flexible zsh plugin manager";
license = licenses.mit;
maintainers = with maintainers; [ pasqui23 sei40kr ];
2020-06-14 13:28:27 +02:00
};
}