ryzenadj: init at unstable-2021-03-12

master
Andreas Wiese 2021-03-18 22:42:40 +01:00
parent bdcd45d5ad
commit 4df06e625d
3 changed files with 38 additions and 0 deletions

View File

@ -2,6 +2,7 @@
let
inherit (pkgs) callPackage;
inherit (pkgs.lib) optionalAttrs;
in rec {
@ -11,4 +12,8 @@ in rec {
usrsctp = callPackage ./pkgs/usrsctp { };
} // optionalAttrs (pkgs.system == "x86_64-linux") {
ryzenadj = callPackage ./pkgs/ryzenadj { };
}

View File

@ -32,6 +32,10 @@
nextcloud-spreed-signaling
usrsctp
;
} // prev.lib.optionalAttrs (prev.system == "x86_64-linux") {
inherit (localPkgs)
ryzenadj
;
};
};

29
pkgs/ryzenadj/default.nix Normal file
View File

@ -0,0 +1,29 @@
{ stdenv, lib, fetchFromGitHub, cmake, pciutils, ... }:
let
src = fetchFromGitHub {
owner = "FlyGoat";
repo = "RyzenAdj";
rev = "a48d42addaad90832ab55b1ab56a0e2445338984";
sha256 = "sha256-rZPjmrloTMbzi7n1p6XrIaDWNgiU7hvY8XTnk2XMtrE=";
};
version = "unstable-2021-03-12";
in stdenv.mkDerivation rec {
pname = "ryzenadj";
inherit version src;
nativeBuildInputs = [ cmake pciutils ];
installPhase = ''
install -D -m0755 ryzenadj $out/bin/ryzenadj
'';
meta = with lib; {
description = "Adjust power management settings for Ryzen mobile processors";
homepage = src.meta.homepage;
license = licenses.lgpl3;
maintainers = with maintainers; [ aw ];
platforms = [ "x86_64-linux" ];
};
}