From 271969a12e4bbab47fc31b3541604a5b9bf5fb08 Mon Sep 17 00:00:00 2001 From: StepBroBD Date: Thu, 29 Jun 2023 18:26:40 -0600 Subject: [PATCH] coconutbattery: init at 3.9.12 Co-authored-by: OTABI Tomoya Co-authored-by: Pol Dellaiera --- .../darwin/coconutbattery/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/os-specific/darwin/coconutbattery/default.nix diff --git a/pkgs/os-specific/darwin/coconutbattery/default.nix b/pkgs/os-specific/darwin/coconutbattery/default.nix new file mode 100644 index 000000000000..69302baa92eb --- /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 b940d883ff73..14ca6d0cb972 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27039,6 +27039,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;