git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #113043 from zowoq/packer

packer: set ldflags, install zsh completion

commit4449e9064fc56b02cd1e588d0cde4bbf8f090991 authorSandro <sandro.jaeckel@gmail.com> dateSun 14 Feb 2021, 05:18 (6 years ago) parentcaa8a5eb3fce65
1 file changed+9−1
pkgs/development/tools/packer/default.nix+9−1
pkgs/development/tools/packer/default.nix+9−1
@@ -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";