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