2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, kernel, fetchFromGitHub, fetchpatch }:
|
2019-11-20 13:11:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zenpower";
|
2022-05-23 13:19:14 +01:00
|
|
|
version = "unstable-2022-04-13";
|
2019-11-20 13:11:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-21 17:07:54 +01:00
|
|
|
owner = "Ta180m";
|
|
|
|
repo = "zenpower3";
|
2022-05-23 13:19:14 +01:00
|
|
|
rev = "c36a86c64b802e9b90b5166caee6a8e8eddaeb56";
|
|
|
|
sha256 = "1i9ap7xgab421f3c68mcmad25xs4h8pfz0g0f9yzg7hxpmb0npxi";
|
2019-11-20 13:11:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2020-04-05 12:03:35 +01:00
|
|
|
makeFlags = [ "KERNEL_BUILD=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
2019-11-20 13:11:35 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D zenpower.ko -t "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/hwmon/zenpower/"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-11-20 13:11:35 +00:00
|
|
|
description = "Linux kernel driver for reading temperature, voltage(SVI2), current(SVI2) and power(SVI2) for AMD Zen family CPUs.";
|
2021-08-21 17:07:54 +01:00
|
|
|
homepage = "https://github.com/Ta180m/zenpower3";
|
2022-05-23 13:19:33 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2021-08-21 17:07:54 +01:00
|
|
|
maintainers = with maintainers; [ alexbakker artturin ];
|
2020-01-29 09:08:00 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2019-11-20 13:11:35 +00:00
|
|
|
broken = versionOlder kernel.version "4.14";
|
|
|
|
};
|
|
|
|
}
|