1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 20:36:27 +00:00
nixpkgs/pkgs/development/tools/packer/default.nix

33 lines
900 B
Nix
Raw Normal View History

{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
2017-01-04 16:24:56 +00:00
buildGoPackage rec {
pname = "packer";
version = "1.7.1";
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}";
sha256 = "sha256-PZwKvb43Xf8HaC148Xo076u3sP53nwC4fJ2X7HU0gDo=";
2017-01-04 16:24:56 +00:00
};
2014-05-14 00:19:41 +01:00
buildFlagsArray = [ "-ldflags=-s -w" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --zsh go/src/${goPackagePath}/contrib/zsh-completion/_packer
'';
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";
homepage = "https://www.packer.io";
2014-05-14 00:19:41 +01:00
license = licenses.mpl20;
maintainers = with maintainers; [ cstrahan zimbatm ma27 ];
2014-05-14 00:19:41 +01:00
platforms = platforms.unix;
};
}