@@ -0,0 +1,38 @@
1+{ lib
2+, fetchFromGitHub
3+, buildGoModule
4+}:
5+
6+buildGoModule rec {
7+ pname = "nomad-pack";
8+ version = "2022-02-11";
9+ rev = "568ac5e42bc41172a1fa3c8b18af2f42b9e341ff";
10+
11+ src = fetchFromGitHub {
12+ owner = "hashicorp";
13+ repo = pname;
14+ inherit rev;
15+ sha256 = "sha256-0hvnGdUT72sWvMER67ZBxcC+VTbuFMIos2NudOjeTB8=";
16+ };
17+
18+ vendorSha256 = "sha256-wmoXZIogKj4i9+AsEjY7QaT2Tn4LQyGQcEFHrRO0W9s=";
19+
20+ # skip running go tests as they require network access
21+ doCheck = false;
22+
23+ doInstallCheck = true;
24+ installCheckPhase = ''
25+ runHook preInstallCheck
26+ $out/bin/nomad-pack --version
27+ runHook postInstallCheck
28+ '';
29+
30+ meta = with lib; {
31+ homepage = "https://github.com/hashicorp/nomad-pack";
32+ changelog = "https://github.com/hashicorp/nomad-pack/blob/main/CHANGELOG.md";
33+ description = "Nomad Pack is a templating and packaging tool used with HashiCorp Nomad.";
34+ license = licenses.mpl20;
35+ maintainers = with maintainers; [ techknowlogick ];
36+ };
37+
38+}