504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, atlas }:
|
|
|
|
buildGoModule rec {
|
|
pname = "atlas";
|
|
version = "0.17.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ariga";
|
|
repo = "atlas";
|
|
rev = "v${version}";
|
|
hash = "sha256-PLwUaj/2WnVTBA+f+OT9RxnGPYL/fwn4Ga4aCWfFNIY=";
|
|
};
|
|
|
|
modRoot = "cmd/atlas";
|
|
|
|
proxyVendor = true;
|
|
vendorHash = "sha256-A7OPGi/FbixBh+o4hGaktmUODFTQo7BytpM0CN5jLWw=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
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)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = atlas;
|
|
command = "atlas version";
|
|
version = "v${version}";
|
|
};
|
|
|
|
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";
|
|
};
|
|
}
|