2021-12-26 17:43:05 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "packer";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.8.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "packer";
|
|
|
|
rev = "v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-jdJD7AW4IrzVl4BPdsFFrRSdCWX9l4nFM+DWIuxLiJ8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
vendorSha256 = "sha256-ufvWgusTMbM88F3BkJ61KM2wRSdqPOlMKqDSYf7tZQA=";
|
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;
|
2022-03-10 19:12:11 +00:00
|
|
|
maintainers = with maintainers; [ cstrahan zimbatm ma27 techknowlogick ];
|
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;
|
|
|
|
};
|
|
|
|
}
|