From 9fbe8cc64b0b4e5977615ee619fae6712b705e95 Mon Sep 17 00:00:00 2001 From: Dave Nicponski Date: Fri, 4 Dec 2020 20:46:43 -0500 Subject: [PATCH] osx-cpu-temp: Init at 1.0 --- .../darwin/osx-cpu-temp/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/os-specific/darwin/osx-cpu-temp/default.nix diff --git a/pkgs/os-specific/darwin/osx-cpu-temp/default.nix b/pkgs/os-specific/darwin/osx-cpu-temp/default.nix new file mode 100644 index 000000000000..1e8a56154f34 --- /dev/null +++ b/pkgs/os-specific/darwin/osx-cpu-temp/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub +, IOKit +}: + +stdenv.mkDerivation rec { + pname = "osx-cpu-temp"; + version = "unstable-2020-12-04"; + + src = fetchFromGitHub rec { + name = "osx-cpu-temp-source"; + owner = "lavoiesl"; + repo = pname; + rev = "6ec951be449badcb7fb84676bbc2c521e600e844"; + sha256 = "1nlibgr55bpln6jbdf8vqcp0fj9zv9343vflb7s9w0yh33fsbg9d"; + }; + + buildInputs = [ IOKit ]; + + installPhase = '' + mkdir -p $out/bin + cp osx-cpu-temp $out/bin + ''; + + meta = with stdenv.lib; { + description = "Outputs current CPU temperature for OSX."; + homepage = "https://github.com/lavoiesl/osx-cpu-temp"; + license = licenses.gpl2; + maintainers = with maintainers; [ virusdave ]; + platforms = platforms.darwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c7d2fbb6241..e9ea9f1f6815 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18118,6 +18118,10 @@ in openisns = callPackage ../os-specific/linux/open-isns { }; + osx-cpu-temp = callPackage ../os-specific/darwin/osx-cpu-temp { + inherit (pkgs.darwin.apple_sdk.frameworks) IOKit; + }; + osxfuse = callPackage ../os-specific/darwin/osxfuse { }; osxsnarf = callPackage ../os-specific/darwin/osxsnarf { };