nixpkgs/pkgs/tools/misc/wakapi/default.nix
2024-04-07 00:21:43 +00:00

36 lines
909 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "wakapi";
version = "2.11.1";
src = fetchFromGitHub {
owner = "muety";
repo = pname;
rev = version;
sha256 = "sha256-ZdKPaHe4miMKb6qEKdRz/fRIkTWDXp2Veu7CP1gRuQw=";
};
vendorHash = "sha256-pRj7Y2xp+Z2StaXRIzI5b2WAkIhR9y8T8DMXWrxOiy4=";
# 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"
];
meta = with lib; {
homepage = "https://wakapi.dev/";
changelog = "https://github.com/muety/wakapi/releases/tag/${version}";
description = "A minimalist self-hosted WakaTime-compatible backend for coding statistics";
license = licenses.gpl3Only;
maintainers = with maintainers; [ t4ccer ];
mainProgram = "wakapi";
};
}