about summary refs log tree commit diff
path: root/pkgs/by-name/st/stats/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/st/stats/package.nix')
-rw-r--r--pkgs/by-name/st/stats/package.nix43
1 files changed, 18 insertions, 25 deletions
diff --git a/pkgs/by-name/st/stats/package.nix b/pkgs/by-name/st/stats/package.nix
index 803898ea36c5e..af74d5bdf1030 100644
--- a/pkgs/by-name/st/stats/package.nix
+++ b/pkgs/by-name/st/stats/package.nix
@@ -1,20 +1,18 @@
-{ lib
-, stdenvNoCC
-, fetchurl
-, undmg
-, writeShellApplication
-, curl
-, jq
-, common-updater-scripts
+{
+  lib,
+  stdenvNoCC,
+  fetchurl,
+  undmg,
+  nix-update-script,
 }:
 
 stdenvNoCC.mkDerivation (finalAttrs: {
   pname = "stats";
-  version = "2.10.11";
+  version = "2.10.16";
 
   src = fetchurl {
     url = "https://github.com/exelban/stats/releases/download/v${finalAttrs.version}/Stats.dmg";
-    hash = "sha256-vF32tDuSAZJrZ21iKtM+/2qk9WWoyMddrtg5wK2+IaI=";
+    hash = "sha256-fSn4qZMXRlWxqIZ2Jh1anLQPbx/TqHA7UFRq+pR3o+4=";
   };
 
   sourceRoot = ".";
@@ -30,23 +28,18 @@ stdenvNoCC.mkDerivation (finalAttrs: {
     runHook postInstall
   '';
 
-  passthru.updateScript = lib.getExe (writeShellApplication {
-    name = "stats-update-script";
-    runtimeInputs = [ curl jq common-updater-scripts ];
-    text = ''
-      set -euo pipefail
-      url="$(curl --silent "https://api.github.com/repos/exelban/stats/tags?per_page=1")"
-      version="$(echo "$url" | jq -r '.[0].name' | cut -c 2-)"
-      update-source-version stats "$version" --file=./pkgs/by-name/st/stats/package.nix
-    '';
-  });
-
-  meta = with lib; {
+  passthru.updateScript = nix-update-script { };
+
+  meta = {
     description = "macOS system monitor in your menu bar";
     homepage = "https://github.com/exelban/stats";
-    license = licenses.mit;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [
+      donteatoreo
+      emilytrau
+      Enzime
+    ];
+    platforms = lib.platforms.darwin;
     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
-    maintainers = with maintainers; [ emilytrau Enzime donteatoreo ];
-    platforms = platforms.darwin;
   };
 })