aboutsummaryrefslogtreecommitdiff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-11-01 10:10:47 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2020-11-01 10:10:47 +0100
commit7a8d5dc8a676a528186ea0f2ece97e832d784562 (patch)
tree7ae606702ddd7e0e1e5bb3c1667af4bc66af375c /pkgs/shells
parentd18c016c2a1744ed6ae26d43a819a695a6fbbc5d (diff)
parentf183291ead647a85b86039e6ce0ff70f5815e5a6 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/zsh/zplugin/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/shells/zsh/zplugin/default.nix b/pkgs/shells/zsh/zplugin/default.nix
new file mode 100644
index 000000000000..c148f60b2eef
--- /dev/null
+++ b/pkgs/shells/zsh/zplugin/default.nix
@@ -0,0 +1,40 @@
+{ stdenvNoCC, lib, fetchFromGitHub, installShellFiles }:
+stdenvNoCC.mkDerivation rec {
+ pname = "zplugin";
+ version = "2.3";
+ src = fetchFromGitHub {
+ owner = "zdharma";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "0qqv5p19s8jb06d6h55dm4acji9x2rpxb2ni3h7fb0q43iz6y85w";
+ };
+ # adapted from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=zsh-zplugin-git
+ dontBuild = true;
+ nativeBuildInputs = [ installShellFiles ];
+ installPhase = ''
+ outdir="$out/share/$pname"
+
+ cd "$src"
+
+ # Zplugin's source files
+ install -dm0755 "$outdir"
+ install -m0644 zplugin{,-side,-install,-autoload}.zsh "$outdir"
+ install -m0755 git-process-output.zsh "$outdir"
+
+ # Zplugin autocompletion
+ installShellCompletion --zsh _zplugin
+
+ #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/zplugin";
+ description = "Flexible zsh plugin manager";
+ license = licenses.mit;
+ maintainers = with maintainers; [ pasqui23 ];
+ };
+}