mongodb-atlas-cli: merge with previous init pr

- update homepage
- add changelog
This commit is contained in:
iamanaws 2025-02-26 19:52:09 -08:00
parent 1fd86cd0c5
commit 297dac5738

View File

@ -1,7 +1,8 @@
{
stdenv,
fetchFromGitHub,
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
nix-update-script,
testers,
@ -12,15 +13,15 @@ buildGoModule rec {
pname = "mongodb-atlas-cli";
version = "1.46.2";
vendorHash = "sha256-z42tJJD/iK9GDnYxdeMYogaMviGABizxX9fdWL8vVik=";
src = fetchFromGitHub {
owner = "mongodb";
repo = "mongodb-atlas-cli";
rev = "refs/tags/atlascli/v${version}";
sha256 = "sha256-yg6GSG4TXPj4n8s4TK/i7NveJXMAQczONSrLn39PKVI=";
tag = "refs/tags/atlascli/v${version}";
hash = "sha256-yg6GSG4TXPj4n8s4TK/i7NveJXMAQczONSrLn39PKVI=";
};
vendorHash = "sha256-z42tJJD/iK9GDnYxdeMYogaMviGABizxX9fdWL8vVik=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
@ -30,7 +31,9 @@ buildGoModule rec {
"-X github.com/mongodb/mongodb-atlas-cli/atlascli/internal/version.Version=v${version}"
];
postInstall = ''
subPackages = [ "cmd/atlas" ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd atlas \
--bash <($out/bin/atlas completion bash) \
--fish <($out/bin/atlas completion fish) \
@ -48,10 +51,14 @@ buildGoModule rec {
};
meta = {
homepage = "https://www.mongodb.com/try/download/shell";
description = "CLI utility to manage MongoDB Atlas from the terminal";
maintainers = with lib.maintainers; [ aduh95 ];
homepage = "https://github.com/mongodb/mongodb-atlas-cli";
changelog = "https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-changelog/#atlas-cli-${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
aduh95
iamanaws
];
mainProgram = "atlas";
};
}