{ lib, buildGoLatestModule, fetchFromGitHub, nixosTests, nix-update-script, }: let version = "2.17.1"; in buildGoLatestModule { pname = "wakapi"; inherit version; src = fetchFromGitHub { owner = "muety"; repo = "wakapi"; tag = version; hash = "sha256-/7jYfLs9IcAWYVWISdDeXWV+PfHGFjkxcFkpqH2lxS8="; }; vendorHash = "sha256-AA9gIIUsoJG4RnDZ1fAJu+iqeXXbRbprBVxuVvR1tzo="; # 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" ]; # Skip tests that require network access checkFlags = [ "-skip=TestLoginHandlerTestSuite" ]; 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"; }; }