2021-04-05 15:23:46 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "packer";
|
2021-04-08 16:26:57 +00:00
|
|
|
version = "1.7.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "packer";
|
|
|
|
rev = "v${version}";
|
2021-04-08 16:26:57 +00:00
|
|
|
sha256 = "sha256-Ey1gkld7WosJgoqnNp4Lz2x3PTI+w5p+A8Cwv4+uUZw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
buildFlagsArray = [ "-ldflags=-s -w" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
installShellCompletion --zsh contrib/zsh-completion/_packer
|
2021-02-16 17:04:54 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool for creating identical machine images for multiple platforms from a single source configuration";
|
|
|
|
homepage = "https://www.packer.io";
|
|
|
|
license = licenses.mpl20;
|
2020-06-18 07:06:33 +00:00
|
|
|
maintainers = with maintainers; [ cstrahan zimbatm ma27 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|