depot/third_party/nixpkgs/pkgs/by-name/al/aldente/package.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

49 lines
1.2 KiB
Nix

{
lib,
stdenvNoCC,
fetchurl,
_7zz,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "aldente";
version = "1.28.2";
src = fetchurl {
url = "https://github.com/davidwernhart/aldente-charge-limiter/releases/download/${finalAttrs.version}/AlDente.dmg";
hash = "sha256-CgBH5PRlq6USfdE8ubHKAYNq1YzUmfIN7wAS4HfJvZU=";
};
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 = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ stepbrobd ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
];
};
})