{
  lib,
  python3Packages,
  fetchFromGitHub,
  callPackage,
}:

python3Packages.buildPythonPackage rec {
  pname = "steam";
  version = "1.4.4";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ValvePython";
    repo = "steam";
    rev = version;
    hash = "sha256-OY04GsX3KMPvpsQl8sUurzFyJu+JKpES8B0iD6Z5uyw=";
  };

  build-system = with python3Packages; [
    setuptools
    wheel
  ];

  dependencies =
    with python3Packages;
    [
      six
      pycryptodomex
      requests
      urllib3
      vdf
      gevent
      protobuf
      cachetools
      cryptography
    ]
    ++ [ (callPackage ./gevent-eventemitter.nix { }) ];

  pythonImportsCheck = [
    "steam"
  ];

  meta = {
    description = "Python package for interacting with Steam";
    homepage = "https://github.com/ValvePython/steam";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ CaptainJawZ ];
  };
}
