2021-09-28 08:13:01 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "packer";
|
2021-09-28 08:13:01 +00:00
|
|
|
version = "1.7.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "packer";
|
|
|
|
rev = "v${version}";
|
2021-09-28 08:13:01 +00:00
|
|
|
sha256 = "15kw4zy0p7hr6jm0202s0fk5ja3ff0pdir37qdifngm1x7id1vxc";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
vendorSha256 = "1785yv48sn504zcig9szjw9s4dxb55dg9idh10i2gzfgbda2c3nf";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# https://github.com/hashicorp/packer/pull/11282
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/hashicorp/packer/commit/dbf13803217e18c6cb567ffefc9476c4e0149e02.patch";
|
|
|
|
sha256 = "1n038x6qnr75c5ci2jp8jcwp6yvlchcf2nydksb2s75ffvidjrsa";
|
|
|
|
})
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-08-06 21:57:35 +00:00
|
|
|
ldflags = [ "-s" "-w" ];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
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 ];
|
2021-09-28 08:13:01 +00:00
|
|
|
changelog = "https://github.com/hashicorp/packer/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|