about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-06-30 19:23:28 +0200
committerGitHub <noreply@github.com>2023-06-30 19:23:28 +0200
commit4586970ee7b8cc79a1dfb5dc938c839925138f67 (patch)
treef7e9d36cac81bef84992fe9568875082c3096ece /pkgs
parenta6f7d46ce4f0aef79b60362ffcfbb286bcf211ff (diff)
parent271969a12e4bbab47fc31b3541604a5b9bf5fb08 (diff)
Merge pull request #240621 from StepBroBD/coconutbattery
coconutbattery: init at 3.9.12
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/os-specific/darwin/coconutbattery/default.nix41
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/coconutbattery/default.nix b/pkgs/os-specific/darwin/coconutbattery/default.nix
new file mode 100644
index 0000000000000..69302baa92eb7
--- /dev/null
+++ b/pkgs/os-specific/darwin/coconutbattery/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenvNoCC
+, fetchzip
+}:
+
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "coconutbattery";
+  version = "3.9.12";
+
+  src = fetchzip {
+    url = "https://coconut-flavour.com/downloads/coconutBattery_${builtins.replaceStrings [ "." ] [ "" ] finalAttrs.version}.zip";
+    hash = "sha256-8WxGjZbxUqchSIfvpK2RLifn7/TD5nau5hgMzLUiV2o=";
+  };
+
+  dontPatch = true;
+  dontConfigure = true;
+  dontBuild = true;
+  dontFixup = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/Applications/coconutBattery.app
+    cp -R . $out/Applications/coconutBattery.app
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "The standard for battery reading since 2005";
+    longDescription = ''
+      With coconutBattery you are always aware of your current battery health.
+      It shows you live information about the battery quality in your Mac, iPhone and iPad.
+    '';
+    homepage = "https://www.coconut-flavour.com/coconutbattery";
+    license = with licenses; [ unfree ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    maintainers = with maintainers; [ stepbrobd ];
+    platforms = [ "aarch64-darwin" "x86_64-darwin" ];
+  };
+})
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 21535624fb563..20b2417f9a414 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -27047,6 +27047,8 @@ with pkgs;
 
   cockroachdb = callPackage ../servers/sql/cockroachdb { };
 
+  coconutbattery = callPackage ../os-specific/darwin/coconutbattery { };
+
   conky = callPackage ../os-specific/linux/conky ({
     lua = lua5_3_compat;
     inherit (linuxPackages.nvidia_x11.settings) libXNVCtrl;