diff options
Diffstat (limited to 'pkgs/by-name/wa/wakapi/package.nix')
-rw-r--r-- | pkgs/by-name/wa/wakapi/package.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/by-name/wa/wakapi/package.nix b/pkgs/by-name/wa/wakapi/package.nix new file mode 100644 index 000000000000..364822734629 --- /dev/null +++ b/pkgs/by-name/wa/wakapi/package.nix @@ -0,0 +1,44 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: +let + version = "2.12.2"; +in +buildGoModule { + pname = "wakapi"; + inherit version; + + src = fetchFromGitHub { + owner = "muety"; + repo = "wakapi"; + rev = "refs/tags/${version}"; + hash = "sha256-6wlFgIof4uzQ3phd7paHZ6Sezp0Dfj8qFzsudFKfNdU="; + }; + + vendorHash = "sha256-q5o88fwc1S14ZwGyDS9aFtJMfPZ4pmMjffmeXODhajg="; + + # 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 = { + 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"; + }; +} |