packer: migrate to buildGoModule
This commit is contained in:
parent
42fa68be1d
commit
2112a55caf
@ -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 New Issue
Block a user