Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.11] istatmenus: init at 7.02.10 #363425

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions pkgs/by-name/is/istatmenus/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
lib,
stdenvNoCC,
fetchurl,
writeShellApplication,
curl,
common-updater-scripts,
unzip,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "istatmenus";
version = "7.02.10";

src = fetchurl {
url = "https://cdn.istatmenus.app/files/istatmenus${lib.versions.major finalAttrs.version}/versions/iStatMenus${finalAttrs.version}.zip";
hash = "sha256-ckYIQsJ0QEsIpXRFo1xioSCOwEL06d0cJrATa1URMIQ=";
};

sourceRoot = ".";

nativeBuildInputs = [ unzip ];

installPhase = ''
runHook preInstall

mkdir -p "$out/Applications"
cp -r *.app "$out/Applications"

runHook postInstall
'';

passthru.updateScript = lib.getExe (writeShellApplication {
name = "istatmenus-update-script";
runtimeInputs = [
curl
common-updater-scripts
];
text = ''
redirect_url="$(curl -s -L -f "https://download.bjango.com/istatmenus${lib.versions.major finalAttrs.version}/" -o /dev/null -w '%{url_effective}')"
version="''${redirect_url##*/}"; version="''${version#iStatMenus}"; version="''${version%.zip}"
update-source-version istatmenus "$version" --file=./pkgs/by-name/is/istatmenus/package.nix
'';
});

meta = {
changelog = "https://bjango.com/mac/istatmenus/versionhistory/";
description = "iStat Menus is set of nine separate and highly configurable menu items that let you know exactly what's going on inside your Mac";
homepage = "https://bjango.com/mac/istatmenus/";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ donteatoreo ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})
Loading