From 6e5ba8cdbbcf65c883d3d1d16eda7551e1a2a7b2 Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Mon, 20 May 2024 22:20:42 +0300 Subject: [PATCH 1/5] stats: format with nixfmt-rfc-style --- pkgs/by-name/st/stats/package.nix | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/st/stats/package.nix b/pkgs/by-name/st/stats/package.nix index 690cd70a8d88..bdd58b2d8e78 100644 --- a/pkgs/by-name/st/stats/package.nix +++ b/pkgs/by-name/st/stats/package.nix @@ -1,11 +1,12 @@ -{ lib -, stdenvNoCC -, fetchurl -, undmg -, writeShellApplication -, curl -, jq -, common-updater-scripts +{ + lib, + stdenvNoCC, + fetchurl, + undmg, + writeShellApplication, + curl, + jq, + common-updater-scripts, }: stdenvNoCC.mkDerivation (finalAttrs: { @@ -32,7 +33,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { passthru.updateScript = lib.getExe (writeShellApplication { name = "stats-update-script"; - runtimeInputs = [ curl jq common-updater-scripts ]; + runtimeInputs = [ + curl + jq + common-updater-scripts + ]; text = '' set -euo pipefail url="$(curl --silent "https://api.github.com/repos/exelban/stats/tags?per_page=1")" @@ -46,7 +51,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { homepage = "https://github.com/exelban/stats"; license = licenses.mit; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - maintainers = with maintainers; [ emilytrau Enzime donteatoreo ]; + maintainers = with maintainers; [ + emilytrau + Enzime + donteatoreo + ]; platforms = platforms.darwin; }; }) From 53081d312162fd5fa32cb98b61ad333bfca95cf2 Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Mon, 20 May 2024 22:23:19 +0300 Subject: [PATCH 2/5] stats: refactor updateScript --- pkgs/by-name/st/stats/package.nix | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/st/stats/package.nix b/pkgs/by-name/st/stats/package.nix index bdd58b2d8e78..0d8918653254 100644 --- a/pkgs/by-name/st/stats/package.nix +++ b/pkgs/by-name/st/stats/package.nix @@ -3,10 +3,7 @@ stdenvNoCC, fetchurl, undmg, - writeShellApplication, - curl, - jq, - common-updater-scripts, + nix-update-script, }: stdenvNoCC.mkDerivation (finalAttrs: { @@ -31,20 +28,7 @@ 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 - ''; - }); + passthru.updateScript = nix-update-script { }; meta = with lib; { description = "macOS system monitor in your menu bar"; From a2cb6b674c329c68d79738d2d60bc51f26df68cf Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Mon, 20 May 2024 22:30:11 +0300 Subject: [PATCH 3/5] stats: remove `with lib;` from meta --- pkgs/by-name/st/stats/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/st/stats/package.nix b/pkgs/by-name/st/stats/package.nix index 0d8918653254..7706210bec70 100644 --- a/pkgs/by-name/st/stats/package.nix +++ b/pkgs/by-name/st/stats/package.nix @@ -30,16 +30,16 @@ stdenvNoCC.mkDerivation (finalAttrs: { passthru.updateScript = nix-update-script { }; - meta = with lib; { + meta = { description = "macOS system monitor in your menu bar"; homepage = "https://github.com/exelban/stats"; - license = licenses.mit; + license = lib.licenses.mit; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ emilytrau Enzime donteatoreo ]; - platforms = platforms.darwin; + platforms = lib.platforms.darwin; }; }) From c0b5df5225126f9a9a58ea3aef33d7d79aae2b0a Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Mon, 20 May 2024 22:30:32 +0300 Subject: [PATCH 4/5] stats: sort meta alphabetically --- pkgs/by-name/st/stats/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/stats/package.nix b/pkgs/by-name/st/stats/package.nix index 7706210bec70..9f1f973cf347 100644 --- a/pkgs/by-name/st/stats/package.nix +++ b/pkgs/by-name/st/stats/package.nix @@ -34,12 +34,12 @@ stdenvNoCC.mkDerivation (finalAttrs: { description = "macOS system monitor in your menu bar"; homepage = "https://github.com/exelban/stats"; license = lib.licenses.mit; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; maintainers = with lib.maintainers; [ + donteatoreo emilytrau Enzime - donteatoreo ]; platforms = lib.platforms.darwin; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; }; }) From a82dda38027d0b735e864a6d0bb49c8bf3580cfe Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Mon, 20 May 2024 22:31:42 +0300 Subject: [PATCH 5/5] stats: 2.10.13 -> 2.10.14 --- pkgs/by-name/st/stats/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/stats/package.nix b/pkgs/by-name/st/stats/package.nix index 9f1f973cf347..586d0672d1fe 100644 --- a/pkgs/by-name/st/stats/package.nix +++ b/pkgs/by-name/st/stats/package.nix @@ -8,11 +8,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "stats"; - version = "2.10.13"; + version = "2.10.14"; src = fetchurl { url = "https://github.com/exelban/stats/releases/download/v${finalAttrs.version}/Stats.dmg"; - hash = "sha256-AzH1rZFqEH8sovZZfJykvsEmCedEZWigQFHWHl6/PdE="; + hash = "sha256-WJBn98C5uV9EmeEM+Zieztuof1CW80co8wrLntY7D0E="; }; sourceRoot = ".";