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
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
testers,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "atlas";
|
|
version = "0.37.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ariga";
|
|
repo = "atlas";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-9OX2CmL9/5LzIbYHQKvC/wRCifGq9Ycycvr3uYck94Q=";
|
|
};
|
|
|
|
modRoot = "cmd/atlas";
|
|
|
|
proxyVendor = true;
|
|
vendorHash = "sha256-wIDPTgfpWD0E9Afi5NHvL684k7YPjYkQIpHotNZeneY=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X ariga.io/atlas/cmd/atlas/internal/cmdapi.version=v${finalAttrs.version}"
|
|
];
|
|
|
|
subPackages = [ "." ];
|
|
|
|
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.tests.version = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
command = "atlas version";
|
|
version = "v${finalAttrs.version}";
|
|
};
|
|
|
|
meta = {
|
|
description = "Manage your database schema as code";
|
|
homepage = "https://atlasgo.io/";
|
|
changelog = "https://github.com/ariga/atlas/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ aaronjheng ];
|
|
mainProgram = "atlas";
|
|
};
|
|
})
|