lol
1{
2 lib,
3 stdenvNoCC,
4 fetchzip,
5}:
6
7stdenvNoCC.mkDerivation (finalAttrs: {
8 pname = "coconutbattery";
9 version = "4.0.4,166";
10
11 src = fetchzip {
12 url = "https://coconut-flavour.com/downloads/coconutBattery_${
13 lib.replaceStrings [ "." "," ] [ "" "_" ] finalAttrs.version
14 }.zip";
15 hash = "sha256-ZbxO6pR752pjaBocA/wqyjPCZaUxV051MaHz1gqQjSg=";
16 };
17
18 installPhase = ''
19 runHook preInstall
20
21 mkdir -p $out/Applications/coconutBattery.app
22 cp -R . $out/Applications/coconutBattery.app
23
24 runHook postInstall
25 '';
26
27 meta = {
28 description = "Standard for battery reading since 2005";
29 longDescription = ''
30 With coconutBattery you are always aware of your current battery health.
31 It shows you live information about the battery quality in your Mac, iPhone and iPad.
32 '';
33 homepage = "https://www.coconut-flavour.com/coconutbattery";
34 license = with lib.licenses; [ unfree ];
35 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
36 maintainers = with lib.maintainers; [ stepbrobd ];
37 platforms = [
38 "aarch64-darwin"
39 "x86_64-darwin"
40 ];
41 };
42})