2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchurl
|
2024-02-07 01:22:34 +00:00
|
|
|
, _7zz
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
|
|
pname = "aldente";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.24.1";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/davidwernhart/aldente-charge-limiter/releases/download/${finalAttrs.version}/AlDente.dmg";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-vOv52SrUki2f9vGzYy8dhVJVxna2ZvhtG6WbKjCv3gA=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontFixup = true;
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
# AlDente.dmg is APFS formatted, unpack with 7zz
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [ _7zz ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
sourceRoot = "AlDente.app";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/Applications/AlDente.app
|
|
|
|
cp -R . $out/Applications/AlDente.app
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
meta = {
|
2023-07-15 17:15:38 +00:00
|
|
|
description = "macOS tool to limit maximum charging percentage";
|
|
|
|
homepage = "https://apphousekitchen.com";
|
|
|
|
changelog = "https://github.com/davidwernhart/aldente-charge-limiter/releases/tag/${finalAttrs.version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
license = with lib.licenses; [ unfree ];
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
|
|
maintainers = with lib.maintainers; [ stepbrobd ];
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = [ "aarch64-darwin" "x86_64-darwin" ];
|
|
|
|
};
|
|
|
|
})
|