nixpkgs/pkgs/applications/networking/cluster/atmos/default.nix
2022-11-14 20:27:25 +08:00

41 lines
1.0 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "atmos";
version = "1.13.1";
src = fetchFromGitHub {
owner = "cloudposse";
repo = pname;
rev = "v${version}";
sha256 = "sha256-iL8quRwW4idY880aEM2rwXRh6JXIvMzlfBDcz2TgHjw=";
};
vendorSha256 = "sha256-pr33Ya6cg3EKIVTBTY8DD0lyTMPF1FcRQK2jdyPiE44=";
ldflags = [ "-s" "-w" "-X github.com/cloudposse/atmos/cmd.Version=v${version}" ];
preCheck = ''
# Remove tests that depend on a network connection.
rm -f pkg/vender/component_vendor_test.go
'';
doCheck = true;
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/atmos version | grep "v${version}"
runHook postInstallCheck
'';
meta = with lib; {
homepage = "https://atmos.tools";
changelog = "https://github.com/cloudposse/atmos/releases/tag/v${version}";
description = "Universal Tool for DevOps and Cloud Automation (works with terraform, helm, helmfile, etc)";
license = licenses.asl20;
maintainers = with maintainers; [ rb ];
};
}