packages/pkgs/ryzen_smu/default.nix

34 lines
841 B
Nix

{ lib, fetchFromGitLab, kernel }:
kernel.stdenv.mkDerivation rec {
pname = "ryzen_smu";
version = "0.1.2";
src = fetchFromGitLab {
owner = "leogx9r";
repo = pname;
rev = "v${version}";
sha256 = "sha256-d/UtfcTYl3Qqd15248qeIEMXzyZmkYMfqs5xQIadeyM=";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = [
"KERNEL_MODULES=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
];
installPhase = ''
install -D ryzen_smu.ko $out/lib/modules/${kernel.modDirVersion}/misc/ryzen_smu.ko
'';
meta = with lib; {
description = "A kernel driver exposing access to the SMU of certain AMD Ryzen processors";
homepage = src.meta.homepage;
license = licenses.gpl2;
maintainers = with maintainers; [ aw ];
platforms = [ "x86_64-linux" ];
};
}