1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "amdctl";
9 version = "0.11";
10
11 src = fetchFromGitHub {
12 owner = "kevinlekiller";
13 repo = "amdctl";
14 tag = "v${version}";
15 hash = "sha256-2wBk/9aAD7ARMGbcVxk+CzEvUf8U4RS4ZwTCj8cHNNo=";
16 };
17
18 installPhase = ''
19 runHook preInstall
20
21 install -Dm755 amdctl $out/bin/amdctl
22
23 runHook postInstall
24 '';
25
26 meta = with lib; {
27 description = "Set P-State voltages and clock speeds on recent AMD CPUs on Linux";
28 mainProgram = "amdctl";
29 homepage = "https://github.com/kevinlekiller/amdctl";
30 license = licenses.gpl3Plus;
31 maintainers = [ ];
32 platforms = [ "x86_64-linux" ];
33 };
34}