Merge pull request #118248 from endocrimes/dani/packer-module
packer: migrate to buildGoModule
This commit is contained in:
commit
7a32c4f6de
1 changed files with 8 additions and 7 deletions
|
@ -1,12 +1,9 @@
|
|||
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
||||
buildGoPackage rec {
|
||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "packer";
|
||||
version = "1.7.1";
|
||||
|
||||
goPackagePath = "github.com/hashicorp/packer";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "packer";
|
||||
|
@ -14,12 +11,16 @@ buildGoPackage rec {
|
|||
sha256 = "sha256-PZwKvb43Xf8HaC148Xo076u3sP53nwC4fJ2X7HU0gDo=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
buildFlagsArray = [ "-ldflags=-s -w" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --zsh go/src/${goPackagePath}/contrib/zsh-completion/_packer
|
||||
installShellCompletion --zsh contrib/zsh-completion/_packer
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue