diff options
Diffstat (limited to 'repo/packages/n/nomad/xmake.lua')
| -rw-r--r-- | repo/packages/n/nomad/xmake.lua | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/repo/packages/n/nomad/xmake.lua b/repo/packages/n/nomad/xmake.lua new file mode 100644 index 000000000..85ea10985 --- /dev/null +++ b/repo/packages/n/nomad/xmake.lua @@ -0,0 +1,37 @@ +-- this package only provides the nomad binary, to be used for testing nomad provisioning + +package("nomad") + set_homepage("https://www.nomadproject.io/") + set_description("Nomad is a workload orchestrator that deploys and manages containers and non-containerized applications.") + + if is_plat("windows") then + add_urls("https://releases.hashicorp.com/nomad/$(version)/nomad_$(version)_windows_amd64.zip") + add_versions("1.9.7", "419e417d33f94888e176f2cccf1a101a16fc283bf721021f2a11f1b74570db97") + elseif is_plat("linux") then + add_urls("https://releases.hashicorp.com/nomad/$(version)/nomad_$(version)_linux_amd64.zip") + add_versions("1.9.7", "e9c7337893eceb549557ef9ad341b3ae64f5f43e29ff1fb167b70cfd16748d2d") + elseif is_plat("macosx") then + if is_arch("arm64") then + add_urls("https://releases.hashicorp.com/nomad/$(version)/nomad_$(version)_darwin_arm64.zip") + add_versions("1.9.7", "90f87dffb3669a842a8428899088f3a0ec5a0d204e5278dbb0c1ac16ab295935") + else + add_urls("https://releases.hashicorp.com/nomad/$(version)/nomad_$(version)_darwin_amd64.zip") + add_versions("1.9.7", "8f5befe1e11ef5664c0c212053aa3fc3e095e52a86e90c1315d7580f19ad7997") + end + end + + on_install(function (package) + if is_plat("windows") then + os.cp("nomad.exe", package:installdir("bin")) + else + os.cp("nomad", package:installdir("bin")) + end + end) + + on_test(function (package) + if is_plat("windows") then + os.run("%s version", package:installdir("bin", "nomad.exe")) + elseif is_plat("linux") then + os.run("%s version", package:installdir("bin", "nomad")) + end + end) |