2024-09-26 11:04:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-10-11 05:15:48 +00:00
|
|
|
buildGoModule,
|
2024-09-26 11:04:55 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
}:
|
|
|
|
let
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "2.12.1";
|
2024-09-26 11:04:55 +00:00
|
|
|
in
|
2024-10-11 05:15:48 +00:00
|
|
|
buildGoModule {
|
2023-02-02 18:25:31 +00:00
|
|
|
pname = "wakapi";
|
2024-09-26 11:04:55 +00:00
|
|
|
inherit version;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "muety";
|
2024-09-26 11:04:55 +00:00
|
|
|
repo = "wakapi";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-+JxTszBa6rURm0vPy8Oke5/hX9EmDphWEp2eglS+SFU=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
vendorHash = "sha256-Q56Ud0MtkstB/dhn+QyAHTzIqHsmKvHEK+5PAt5lIMM=";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
# Not a go module required by the project, contains development utilities
|
|
|
|
excludedPackages = [ "scripts" ];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Fix up reported version
|
|
|
|
postPatch = ''echo ${version} > version.txt'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
meta = {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://wakapi.dev/";
|
|
|
|
changelog = "https://github.com/muety/wakapi/releases/tag/${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Minimalist self-hosted WakaTime-compatible backend for coding statistics";
|
2024-09-26 11:04:55 +00:00
|
|
|
license = lib.licenses.gpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
t4ccer
|
|
|
|
isabelroses
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "wakapi";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
}
|