1{ lib
2, buildGoModule
3, fetchFromGitHub
4, installShellFiles
5}:
6
7buildGoModule rec {
8 pname = "packer";
9 version = "1.9.4";
10
11 src = fetchFromGitHub {
12 owner = "hashicorp";
13 repo = "packer";
14 rev = "v${version}";
15 hash = "sha256-oGEG9uGjZTpJjQBnVlffFpNc5sb7HyD/ibpnQUhtTH4=";
16 };
17
18 vendorHash = "sha256-vHVx9vFPvctWNzibfZlN7mEYngYd6q7s9gMIM0FX0Ao=";
19
20 subPackages = [ "." ];
21
22 ldflags = [ "-s" "-w" ];
23
24 nativeBuildInputs = [ installShellFiles ];
25
26 postInstall = ''
27 installShellCompletion --zsh contrib/zsh-completion/_packer
28 '';
29
30 meta = with lib; {
31 description = "A tool for creating identical machine images for multiple platforms from a single source configuration";
32 homepage = "https://www.packer.io";
33 license = licenses.mpl20;
34 maintainers = with maintainers; [ zimbatm ma27 techknowlogick qjoly ];
35 changelog = "https://github.com/hashicorp/packer/blob/v${version}/CHANGELOG.md";
36 };
37}