Merge pull request #118248 from endocrimes/dani/packer-module

packer: migrate to buildGoModule
This commit is contained in:
Sandro 2021-04-02 17:31:43 +02:00 committed by GitHub
commit 7a32c4f6de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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; {