{ stdenv, lib, fetchFromGitHub, cmake, pciutils, ... }: stdenv.mkDerivation rec { pname = "ryzenadj"; version = "0.8.1"; src = fetchFromGitHub { owner = "FlyGoat"; repo = pname; rev = "v${version}"; sha256 = "sha256-1saFfS7jNGxA0YIpOBYekt7WC3gZ5CoDngh0nbdSFp4="; }; 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" ]; }; }