sbomnix: 1.7.0 -> 1.7.1
[NixPkgs.git] / pkgs / by-name / wa / wakatime-cli / package.nix
blobc678e5764feba9099e92a8208deab7cb8e3993ae
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   testers,
6   wakatime-cli,
7 }:
9 buildGoModule rec {
10   pname = "wakatime-cli";
11   version = "1.102.3";
13   src = fetchFromGitHub {
14     owner = "wakatime";
15     repo = "wakatime-cli";
16     rev = "v${version}";
17     hash = "sha256-RnEyrbdYP8BYQ9M+iwikTfYF8HRosR6vhHiQJvGNZ/s=";
18   };
20   vendorHash = "sha256-s9nCr55XR/0ZriweDOBRIDpmp+GUE85FWLJkWXqX5/U=";
22   ldflags = [
23     "-s"
24     "-w"
25     "-X github.com/wakatime/wakatime-cli/pkg/version.Version=${version}"
26   ];
28   checkFlags =
29     let
30       skippedTests = [
31         # Tests requiring network
32         "TestFileExperts"
33         "TestSendHeartbeats"
34         "TestSendHeartbeats_ExtraHeartbeats"
35         "TestSendHeartbeats_IsUnsavedEntity"
36         "TestSendHeartbeats_NonExistingExtraHeartbeatsEntity"
37         "TestFileExperts_Err(Auth|Api|BadRequest)"
39         # Flaky tests
40         "TestLoadParams_ApiKey_FromVault_Err_Darwin"
41       ];
42     in
43     [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
45   passthru.tests.version = testers.testVersion {
46     package = wakatime-cli;
47     command = "HOME=$(mktemp -d) wakatime-cli --version";
48   };
50   meta = {
51     homepage = "https://wakatime.com/";
52     description = "WakaTime command line interface";
53     license = lib.licenses.bsd3;
54     maintainers = with lib.maintainers; [ sigmanificient ];
55     mainProgram = "wakatime-cli";
56   };