{
  lib,
  python3,
  fetchFromGitHub,
  wrapGAppsHook,
  ryzenadj
}:

python3.pkgs.buildPythonApplication rec {
  pname = "ryzen-ppd";
  version = "0.4.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "xsmile";
    repo = "ryzen-ppd";
    rev = version;
    hash = "sha256-ZXQ1lsJ+HPAlttIwWr0ACsUbwIKo1psz1rhxO8S70fw=";
  };

  build-system = [
    python3.pkgs.setuptools
    python3.pkgs.wheel
    wrapGAppsHook
  ];

  dependencies = with python3.pkgs; [
    dbus-next
    pygobject3
  ];

  pythonImportsCheck = [
    "ryzen_ppd"
  ];

	preFixup = ''
		gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${ryzenadj}/lib")
	'';

  meta = {
    description = "";
    homepage = "https://github.com/xsmile/ryzen-ppd";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ ];
    mainProgram = "ryzen-ppd";
  };
}
