13 src = fetchFromGitHub {
17 sha256 = "sha256-LLRNaY6ArUNoKSWSauCh2RKEGO5+G1OnoCAqMaAfOkY=";
20 vendorHash = "sha256-NVmgAlNQvRj/7poIEWjMyKw2qWMd/HwbdSFHpumnRlo=";
23 ldflags = [ "-s" "-w" "-X main.version=${version}" ];
25 subPackages = [ "cmd/modern" ];
27 nativeBuildInputs = [ installShellFiles ];
30 export HOME=$(mktemp -d)
34 mv $out/bin/modern $out/bin/sqlcmd
36 installShellCompletion --cmd sqlcmd \
37 --bash <($out/bin/sqlcmd completion bash) \
38 --fish <($out/bin/sqlcmd completion fish) \
39 --zsh <($out/bin/sqlcmd completion zsh)
42 passthru.tests.version = testers.testVersion {
44 command = "sqlcmd --version";
49 description = "A command line tool for working with Microsoft SQL Server, Azure SQL Database, and Azure Synapse";
50 mainProgram = "sqlcmd";
51 homepage = "https://github.com/microsoft/go-sqlcmd";
52 changelog = "https://github.com/microsoft/go-sqlcmd/releases/tag/v${version}";
53 license = lib.licenses.mit;
54 maintainers = [ lib.maintainers.ratsclub ];