nixpkgs/pkgs/os-specific/linux/zenpower/default.nix

33 lines
992 B
Nix
Raw Normal View History

{ lib, stdenv, kernel, fetchFromGitHub, fetchpatch }:
2019-11-20 13:11:35 +00:00
stdenv.mkDerivation rec {
pname = "zenpower";
version = "0.1.12";
2019-11-20 13:11:35 +00:00
src = fetchFromGitHub {
owner = "ocerman";
repo = "zenpower";
rev = "v${version}";
sha256 = "116yrw4ygh3fqwhniaqq0nps29pq87mi2q1375f1ylkfiak8n63a";
2019-11-20 13:11:35 +00:00
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies;
2020-04-05 11:03:35 +00: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/"
'';
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.";
homepage = "https://github.com/ocerman/zenpower";
license = licenses.gpl2;
maintainers = with maintainers; [ alexbakker ];
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";
};
}