mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
testers,
|
|
wakatime-cli,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "wakatime-cli";
|
|
version = "1.98.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wakatime";
|
|
repo = "wakatime-cli";
|
|
rev = "v${version}";
|
|
hash = "sha256-Ez5fzaZxvHOH8z4tQ7+PUnGrpzAd97vbAta1exEtvtQ=";
|
|
};
|
|
|
|
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";
|
|
};
|
|
}
|