2021-02-13 21:09:13 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
2017-01-04 16:24:56 +00:00
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "packer";
|
2021-02-17 22:35:46 +00:00
|
|
|
version = "1.7.0";
|
2014-05-14 00:19:41 +01:00
|
|
|
|
2017-10-05 02:27:37 +01:00
|
|
|
goPackagePath = "github.com/hashicorp/packer";
|
2016-05-13 09:25:01 +01:00
|
|
|
|
2017-01-04 16:24:56 +00:00
|
|
|
subPackages = [ "." ];
|
2016-05-13 09:25:01 +01:00
|
|
|
|
2017-01-04 16:24:56 +00:00
|
|
|
src = fetchFromGitHub {
|
2017-10-05 02:27:37 +01:00
|
|
|
owner = "hashicorp";
|
2017-01-04 16:24:56 +00:00
|
|
|
repo = "packer";
|
|
|
|
rev = "v${version}";
|
2021-02-17 22:35:46 +00:00
|
|
|
sha256 = "sha256-x62C44vTIysk9Lx9HZeTBf8k1+P5hfMIijvTWu3cZrA=";
|
2017-01-04 16:24:56 +00:00
|
|
|
};
|
2014-05-14 00:19:41 +01:00
|
|
|
|
2021-02-13 21:09:13 +00:00
|
|
|
buildFlagsArray = [ "-ldflags=-s -w" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --zsh go/src/${goPackagePath}/contrib/zsh-completion/_packer
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-05-14 00:19:41 +01:00
|
|
|
description = "A tool for creating identical machine images for multiple platforms from a single source configuration";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.packer.io";
|
2014-05-14 00:19:41 +01:00
|
|
|
license = licenses.mpl20;
|
2020-06-10 21:29:13 +01:00
|
|
|
maintainers = with maintainers; [ cstrahan zimbatm ma27 ];
|
2014-05-14 00:19:41 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|