blob: f3b571a1281fc6bf0f3b4a03052e2c4ee63bb5eb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{
lib,
stdenv,
buildGo121Module,
fetchFromGitHub,
installShellFiles,
}:
buildGo121Module rec {
pname = "turso-cli";
version = "0.85.3";
nativeBuildInputs = [ installShellFiles ];
src = fetchFromGitHub {
owner = "tursodatabase";
repo = "turso-cli";
rev = "v${version}";
hash = "sha256-dJpHrqPyikkUnE4Un1fGOEJL49U5IiInYeSWmI04r18=";
};
vendorHash = "sha256-Hv4CacBrRX2YT3AkbNzyWrA9Ex6YMDPrPvezukwMkTE=";
# Build with production code
tags = ["prod"];
# Include version for `turso --version` reporting
preBuild = ''
echo "v${version}" > internal/cmd/version.txt
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd turso \
--bash <($out/bin/turso completion bash) \
--fish <($out/bin/turso completion fish) \
--zsh <($out/bin/turso completion zsh)
'';
# Test_setDatabasesCache fails due to /homeless-shelter: read-only file system error.
doCheck = false;
meta = with lib; {
description = "This is the command line interface (CLI) to Turso.";
homepage = "https://turso.tech";
mainProgram = "turso";
license = licenses.mit;
maintainers = with maintainers; [ zestsystem kashw2 ];
};
}
|