{ lib, buildGoLatestModule, fetchFromGitHub, nixosTests, nix-update-script, }: let version = "2.15.0"; in buildGoLatestModule { pname = "wakapi"; inherit version; src = fetchFromGitHub { owner = "muety"; repo = "wakapi"; tag = version; hash = "sha256-tRLZV8vZEvPq5hsUhj5h3AtSGvYXm1SXc+w3CRZFIRU="; }; vendorHash = "sha256-912x6LwitYXdjWpP75Xoc56JXadeLQZuESSyLoaJcU0="; # 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"; }; }