blob: dd20ce1c2d829d8cb6e2e4c9456a8277bd9e4894 (
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
48
49
50
51
52
53
54
55
56
57
|
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
wakatime-cli,
}:
buildGoModule rec {
pname = "wakatime-cli";
version = "1.95.0";
src = fetchFromGitHub {
owner = "wakatime";
repo = "wakatime-cli";
rev = "v${version}";
hash = "sha256-dTT4+lvxB6WjDWdYznYBOs/cIa7mJudyN4P4TF67hRY=";
};
vendorHash = "sha256-+9zdEIaKQlLcBwFaY5Fe5mpHWQDqfV+j1TPmDkdRjyk=";
ldflags = [
"-s"
"-w"
"-X github.com/wakatime/wakatime-cli/pkg/version.Version=${version}"
];
checkFlags =
let
skippedTests = [
# Tests requiring network
"TestFileExperts"
"TestSendHeartbeats"
"TestSendHeartbeats_ExtraHeartbeats"
"TestSendHeartbeats_IsUnsavedEntity"
"TestSendHeartbeats_NonExistingExtraHeartbeatsEntity"
"TestFileExperts_Err(Auth|Api|BadRequest)"
# Flaky tests
"TestLoadParams_ApiKey_FromVault_Err_Darwin"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
passthru.tests.version = testers.testVersion {
package = wakatime-cli;
command = "HOME=$(mktemp -d) wakatime-cli --version";
};
meta = {
homepage = "https://wakatime.com/";
description = "WakaTime command line interface";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ sigmanificient ];
mainProgram = "wakatime-cli";
};
}
|