summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/osx-cpu-temp/default.nix
blob: ea9d8399667ac14898e7b7ac17b5516e06a5f473 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, 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 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;
  };
}