From 0c3a2265b186d7ca7bec93c99d1e683bc0b51d6f Mon Sep 17 00:00:00 2001 From: isabel Date: Mon, 9 Sep 2024 14:12:12 +0100 Subject: [PATCH 1/3] wakapi: move to by name --- .../misc/wakapi/default.nix => by-name/wa/wakapi/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/misc/wakapi/default.nix => by-name/wa/wakapi/package.nix} (100%) diff --git a/pkgs/tools/misc/wakapi/default.nix b/pkgs/by-name/wa/wakapi/package.nix similarity index 100% rename from pkgs/tools/misc/wakapi/default.nix rename to pkgs/by-name/wa/wakapi/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 51d412ac45f75..857fc7711e005 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13733,8 +13733,6 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) OpenCL; }; - wakapi = callPackage ../tools/misc/wakapi { }; - wambo = callPackage ../development/tools/wambo { }; weather = callPackage ../applications/misc/weather { }; From c2e3956797ac0d2aa9128f36ff722890a29a5880 Mon Sep 17 00:00:00 2001 From: isabel Date: Mon, 9 Sep 2024 14:16:14 +0100 Subject: [PATCH 2/3] wakapi: 2.11.2 -> 2.12.0 --- pkgs/by-name/wa/wakapi/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wa/wakapi/package.nix b/pkgs/by-name/wa/wakapi/package.nix index 8edcd7bef01fd..6a7decd97d44b 100644 --- a/pkgs/by-name/wa/wakapi/package.nix +++ b/pkgs/by-name/wa/wakapi/package.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "wakapi"; - version = "2.11.2"; + version = "2.12.0"; src = fetchFromGitHub { owner = "muety"; repo = pname; rev = version; - sha256 = "sha256-lBjYtb64blFUH/iW/SmC4A7nX9asokvsNKu6QVYgmZ8="; + sha256 = "sha256-/aacT/VLA5S4PeGcxEGaCpgAw++b3VFD7T0CldZWcQI="; }; - vendorHash = "sha256-Kt7RzAGZeLFhwvq+V6AK88rivqkoTE1Zep7NMh3BXXQ="; + vendorHash = "sha256-Q56Ud0MtkstB/dhn+QyAHTzIqHsmKvHEK+5PAt5lIMM="; # Not a go module required by the project, contains development utilities excludedPackages = [ "scripts" ]; From 7bee8c8cd9a6e8fde8a0fac18c571ab7c08d16ec Mon Sep 17 00:00:00 2001 From: isabel Date: Mon, 9 Sep 2024 14:17:09 +0100 Subject: [PATCH 3/3] wakapi: modernize --- pkgs/by-name/wa/wakapi/package.nix | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/wa/wakapi/package.nix b/pkgs/by-name/wa/wakapi/package.nix index 6a7decd97d44b..ace3fbb24141d 100644 --- a/pkgs/by-name/wa/wakapi/package.nix +++ b/pkgs/by-name/wa/wakapi/package.nix @@ -1,14 +1,20 @@ -{ lib, buildGoModule, fetchFromGitHub }: - -buildGoModule rec { - pname = "wakapi"; +{ + lib, + buildGo123Module, + fetchFromGitHub, +}: +let version = "2.12.0"; +in +buildGo123Module { + pname = "wakapi"; + inherit version; src = fetchFromGitHub { owner = "muety"; - repo = pname; - rev = version; - sha256 = "sha256-/aacT/VLA5S4PeGcxEGaCpgAw++b3VFD7T0CldZWcQI="; + repo = "wakapi"; + rev = "refs/tags/${version}"; + hash = "sha256-/aacT/VLA5S4PeGcxEGaCpgAw++b3VFD7T0CldZWcQI="; }; vendorHash = "sha256-Q56Ud0MtkstB/dhn+QyAHTzIqHsmKvHEK+5PAt5lIMM="; @@ -24,12 +30,15 @@ buildGoModule rec { "-w" ]; - meta = with lib; { + 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 = licenses.gpl3Only; - maintainers = with maintainers; [ t4ccer ]; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ + t4ccer + isabelroses + ]; mainProgram = "wakapi"; }; }