nixpkgs/pkgs/by-name/al/aldente/package.nix
Yifei Sun 629b012e04
aldente: 1.24.1 -> 1.27.3
- also formatted with nixfmt-rfc-style
2024-08-10 23:36:50 +09:00

50 lines
1.2 KiB
Nix

{
lib,
stdenvNoCC,
fetchurl,
_7zz,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "aldente";
version = "1.27.3";
src = fetchurl {
url = "https://github.com/davidwernhart/aldente-charge-limiter/releases/download/${finalAttrs.version}/AlDente.dmg";
hash = "sha256-G6Kpfy1LE1VG/nTks4KU6doTKZeJT6gk6JtKmUEy6FI=";
};
dontBuild = true;
dontFixup = true;
# AlDente.dmg is APFS formatted, unpack with 7zz
nativeBuildInputs = [ _7zz ];
sourceRoot = "AlDente.app";
installPhase = ''
runHook preInstall
mkdir -p $out/Applications/AlDente.app
cp -R . $out/Applications/AlDente.app
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "macOS tool to limit maximum charging percentage";
homepage = "https://apphousekitchen.com";
changelog = "https://github.com/davidwernhart/aldente-charge-limiter/releases/tag/${finalAttrs.version}";
license = lib.licenses.unfree;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = with lib.maintainers; [ stepbrobd ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
];
};
})