Skip to content

Commit

Permalink
python312Packages.steam: init at 1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandapip1 committed Sep 16, 2024
1 parent 3e56f58 commit 09fab5e
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
57 changes: 57 additions & 0 deletions pkgs/development/python-modules/steam/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
setuptools,
six,
pycryptodomex,
requests,
vdf,
gevent,
gevent-eventemitter,
protobuf,
cachetools,
}:

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

src = fetchFromGitHub {
owner = "ValvePython";
repo = "steam";
rev = "refs/tags/v${version}";
hash = "sha256-OY04GsX3KMPvpsQl8sUurzFyJu+JKpES8B0iD6Z5uyw=";
};

patches = [
# https://github.com/ValvePython/steam/pull/466
/* (fetchpatch {
url = "https://github.com/ValvePython/steam/commit/e313e05d03cfbb9413cfb279a4a14fa55d0b3c4e.patch";
hash = "sha256-y1LMwsnMXTVI8RsH07gSNQyKJfubDR+KYAkC8aHIYKw=";
}) */
# TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict'
./whydoesthisneedfixing.patch
];

build-system = [ setuptools ];
dependencies = [
six
pycryptodomex
requests
vdf
gevent
protobuf
gevent-eventemitter
cachetools
];

meta = {
description = "Python package for interacting with Steam";
homepage = "https://steam.readthedocs.io/en/stable/"; # setup.py links to GitHub, but GitHub links to ReadTheDocs
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pandapip1 ];
};
}
14 changes: 14 additions & 0 deletions pkgs/development/python-modules/steam/whydoesthisneedfixing.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/steam/client/cdn.py b/steam/client/cdn.py
index dbd09ab..3762653 100644
--- a/steam/client/cdn.py
+++ b/steam/client/cdn.py
@@ -836,6 +836,9 @@ class CDNClient(object):
else:
manifest_gid = depot_info.get('manifests', {}).get(branch)

+ if type(manifest_gid) == dict:
+ manifest_gid = manifest_gid.get('gid')
+
if manifest_gid is not None:
tasks.append(
self.gpool.spawn(
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14904,6 +14904,8 @@ self: super: with self; {

stdlibs = callPackage ../development/python-modules/stdlibs { };

steam = callPackage ../development/python-modules/steam { };

steamodd = callPackage ../development/python-modules/steamodd { };

steamship = callPackage ../development/python-modules/steamship { };
Expand Down

0 comments on commit 09fab5e

Please sign in to comment.