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 Permalink 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";
2024-01-26 11:02:43 +01:00
version = "3.13.1";
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}";
2024-01-26 11:02:43 +01:00
hash = "sha256-fnBV0LmC/wJm0pOITJ1mhiBqsg2F8AQJWvn0p/Bgo5Q=";
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"
2023-05-30 06:26:30 +02:00
# Installing backward compatibility layer
install -m0644 zinit{,-side,-install,-autoload}.zsh "$outdir"
install -m0755 share/git-process-output.zsh "$outdir"
2020-06-14 13:28:27 +02:00
# 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
};
}