@@ -1,4 +1,4 @@
1−{ lib, buildGoPackage, fetchFromGitHub }:
1+{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
22buildGoPackage rec {
33 pname = "packer";
44 version = "1.6.6";
@@ -14,6 +14,14 @@ buildGoPackage rec {
1414 sha256 = "sha256-kFDy8Zlx+D5JDyNlAmB/ICTe4K9s6KDbALP5pom5OQg=";
1515 };
1616
17+ buildFlagsArray = [ "-ldflags=-s -w" ];
18+
19+ nativeBuildInputs = [ installShellFiles ];
20+
21+ postInstall = ''
22+ installShellCompletion --zsh go/src/${goPackagePath}/contrib/zsh-completion/_packer
23+ '';
24+
1725 meta = with lib; {
1826 description = "A tool for creating identical machine images for multiple platforms from a single source configuration";
1927 homepage = "https://www.packer.io";