ryzen_smu: init at 0.1.1

master
Andreas Wiese 2021-03-19 00:39:45 +01:00
parent 4df06e625d
commit ff2b70c8a1
3 changed files with 36 additions and 0 deletions

View File

@ -16,4 +16,6 @@ in rec {
ryzenadj = callPackage ./pkgs/ryzenadj { }; ryzenadj = callPackage ./pkgs/ryzenadj { };
ryzen_smu = callPackage ./pkgs/ryzen_smu { kernel = pkgs.linux; };
} }

View File

@ -35,6 +35,7 @@
} // prev.lib.optionalAttrs (prev.system == "x86_64-linux") { } // prev.lib.optionalAttrs (prev.system == "x86_64-linux") {
inherit (localPkgs) inherit (localPkgs)
ryzenadj ryzenadj
ryzen_smu
; ;
}; };

View File

@ -0,0 +1,33 @@
{ lib, fetchFromGitLab, kernel }:
kernel.stdenv.mkDerivation rec {
pname = "ryzen_smu";
version = "0.1.1";
src = fetchFromGitLab {
owner = "leogx9r";
repo = pname;
rev = "v${version}";
sha256 = "sha256-1VxpJKKl/Og7Q6NpJ3Y+i8U9RKZkTCjv6LJzsLOC5vk=";
};
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" ];
};
}