diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-05-16 21:51:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 21:51:57 +0200 |
commit | 6dadeb0857c044f8a0a80c67f2937eabb18fce87 (patch) | |
tree | e207caaf6f6dd3c9ab6b9561abac844520d1ed0d /pkgs/by-name | |
parent | 07a44d8475dc54b289e9a4ac31c1a83844776869 (diff) | |
parent | 337284ccb99cb416a46c5042fd08039c5163cce1 (diff) |
Merge pull request #312182 from Sigmanificient/wakatime
wakatime: 1.73.0 -> 1.90.0
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/wa/wakatime/package.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/by-name/wa/wakatime/package.nix b/pkgs/by-name/wa/wakatime/package.nix new file mode 100644 index 0000000000000..eb62951df2106 --- /dev/null +++ b/pkgs/by-name/wa/wakatime/package.nix @@ -0,0 +1,57 @@ +{ + lib, + buildGo122Module, + fetchFromGitHub, + testers, + wakatime, +}: + +buildGo122Module rec { + pname = "wakatime"; + version = "1.90.0"; + + src = fetchFromGitHub { + owner = "wakatime"; + repo = "wakatime-cli"; + rev = "v${version}"; + hash = "sha256-A2YrDrXmMR4BJUOYuo3h3Pa5HqyYSoDr/qdH54INU3w="; + }; + + vendorHash = "sha256-pejrUFcv9c4ZAE3Cuw7uytc1T2pr7SOZNJ/Wr8K+fas="; + + 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; + command = "HOME=$(mktemp -d) wakatime-cli --version"; + }; + + meta = with lib; { + homepage = "https://wakatime.com/"; + description = "WakaTime command line interface"; + license = licenses.bsd3; + maintainers = with maintainers; [ sigmanificient ]; + mainProgram = "wakatime-cli"; + }; +} |