Merge pull request #313217 from DontEatOreo/update-stats

stats: 2.10.13 -> 2.10.14
This commit is contained in:
Pol Dellaiera
2024-05-21 07:44:59 +02:00
committed by GitHub
+17 -24
View File
@@ -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.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 = ".";
@@ -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
'';
});
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;
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;
};
})