From 0f132d0f2703e3d07e6ad63896ae40a7683b3b2f Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Sat, 28 Sep 2019 12:50:30 +0200 Subject: [PATCH] zsh-history: make use of `installShellCompletions` helper --- pkgs/shells/zsh/zsh-history/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index 7da69ce89ba3..54a39209ca9c 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildGoPackage }: +{ lib, fetchFromGitHub, buildGoPackage, installShellFiles }: buildGoPackage rec { pname = "zsh-history"; @@ -11,13 +11,15 @@ buildGoPackage rec { sha256 = "12dc380zfg3b9k7rcsyzi9dxqh28c4957b3fsx1nxvqvdm3ralm2"; }; + nativeBuildInputs = [ installShellFiles ]; + goDeps = ./deps.nix; goPackagePath = "github.com/b4b4r07/history"; postInstall = '' install -d $out/share cp -r $NIX_BUILD_TOP/go/src/${goPackagePath}/misc/* $out/share - cp -r $out/share/zsh/completions $out/share/zsh/site-functions + installShellCompletion --zsh --name _history $out/share/zsh/completions/_history ''; meta = with lib; {