51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
nixosTests,
|
|
nix-update-script,
|
|
}:
|
|
let
|
|
version = "2.13.3";
|
|
in
|
|
buildGoModule {
|
|
pname = "wakapi";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "muety";
|
|
repo = "wakapi";
|
|
tag = version;
|
|
hash = "sha256-J+h0FNVXkSHZr7Hb/q5T5TF0CVRd7e+iJg5b/oGPmsw=";
|
|
};
|
|
|
|
vendorHash = "sha256-8SjBRagqdzJvW8eCKLeHBOQL4qX83USMIDDyS+8Mpvo=";
|
|
|
|
# Not a go module required by the project, contains development utilities
|
|
excludedPackages = [ "scripts" ];
|
|
|
|
# Fix up reported version
|
|
postPatch = ''echo ${version} > version.txt'';
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
passthru = {
|
|
nixos = nixosTests.wakapi;
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://wakapi.dev/";
|
|
changelog = "https://github.com/muety/wakapi/releases/tag/${version}";
|
|
description = "Minimalist self-hosted WakaTime-compatible backend for coding statistics";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [
|
|
t4ccer
|
|
isabelroses
|
|
];
|
|
mainProgram = "wakapi";
|
|
};
|
|
}
|