Files
nixpkgs/pkgs/by-name/mo/mongodb-atlas-cli/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

65 lines
1.7 KiB
Nix

{
stdenv,
fetchFromGitHub,
lib,
buildGoModule,
installShellFiles,
nix-update-script,
testers,
mongodb-atlas-cli,
}:
buildGoModule rec {
pname = "mongodb-atlas-cli";
version = "1.48.0";
src = fetchFromGitHub {
owner = "mongodb";
repo = "mongodb-atlas-cli";
tag = "atlascli/v${version}";
hash = "sha256-xdsW1REvd6yIsFO9j4t7Ydb9eVt1a3I3TMBYw5eeYXI=";
};
vendorHash = "sha256-Qwk4iVFvNGyam3QNJSuwCHD0BiqPIGV7qj3HfUzJNsQ=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X github.com/mongodb/mongodb-atlas-cli/atlascli/internal/version.GitCommit=${src.rev}"
"-X github.com/mongodb/mongodb-atlas-cli/atlascli/internal/version.Version=v${version}"
];
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) \
--zsh <($out/bin/atlas completion zsh)
'';
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version-regex=atlascli/v(.+)" ];
};
tests.version = testers.testVersion {
package = mongodb-atlas-cli;
version = "v${version}";
};
};
meta = {
description = "CLI utility to manage MongoDB Atlas from the terminal";
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";
};
}