2021-02-16 17:04:54 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "packer";
|
2021-02-19 19:06:45 +00:00
|
|
|
version = "1.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/hashicorp/packer";
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "packer";
|
|
|
|
rev = "v${version}";
|
2021-02-19 19:06:45 +00:00
|
|
|
sha256 = "sha256-x62C44vTIysk9Lx9HZeTBf8k1+P5hfMIijvTWu3cZrA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
buildFlagsArray = [ "-ldflags=-s -w" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --zsh go/src/${goPackagePath}/contrib/zsh-completion/_packer
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|