42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||
|
|
||
|
buildGoModule rec {
|
||
|
pname = "atlas";
|
||
|
version = "0.14.1";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "ariga";
|
||
|
repo = "atlas";
|
||
|
rev = "v${version}";
|
||
|
hash = "sha256-dOqL/9sJUbaHqF3N5PEL7f6LxQQWNL0FvaH5BxQp4Xg=";
|
||
|
};
|
||
|
|
||
|
modRoot = "cmd/atlas";
|
||
|
|
||
|
vendorHash = "sha256-1Hhl2TzJWWXk4du9nbJTPXdYuss4TWfUIOw2DaAJQis=";
|
||
|
|
||
|
nativeBuildInputs = [ installShellFiles ];
|
||
|
|
||
|
env.GOWORK = "off";
|
||
|
|
||
|
ldflags = [ "-s" "-w" "-X ariga.io/atlas/cmd/atlas/internal/cmdapi.version=v${version}" ];
|
||
|
|
||
|
subPackages = [ "." ];
|
||
|
|
||
|
postInstall = ''
|
||
|
installShellCompletion --cmd atlas \
|
||
|
--bash <($out/bin/atlas completion bash) \
|
||
|
--fish <($out/bin/atlas completion fish) \
|
||
|
--zsh <($out/bin/atlas completion zsh)
|
||
|
'';
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "A modern tool for managing database schemas";
|
||
|
homepage = "https://atlasgo.io/";
|
||
|
changelog = "https://github.com/ariga/atlas/releases/tag/v${version}";
|
||
|
license = licenses.asl20;
|
||
|
maintainers = [ maintainers.marsam ];
|
||
|
mainProgram = "atlas";
|
||
|
};
|
||
|
}
|