From ced67b114a857b00367230fb53aa9fc4ea46b94b Mon Sep 17 00:00:00 2001 From: Dan Haraj Date: Tue, 14 Nov 2017 14:32:21 -0500 Subject: [PATCH] s2clientprotocol: init at 3.19.1.58600.0 --- .../s2clientprotocol/default.nix | 27 +++++++++++++++++++ .../s2clientprotocol/pure-version.patch | 13 +++++++++ pkgs/top-level/python-packages.nix | 1 + 3 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/s2clientprotocol/default.nix create mode 100644 pkgs/development/python-modules/s2clientprotocol/pure-version.patch diff --git a/pkgs/development/python-modules/s2clientprotocol/default.nix b/pkgs/development/python-modules/s2clientprotocol/default.nix new file mode 100644 index 000000000000..3c24a7e522d0 --- /dev/null +++ b/pkgs/development/python-modules/s2clientprotocol/default.nix @@ -0,0 +1,27 @@ +{ buildPythonPackage +, lib +, fetchPypi +, protobuf +}: + +buildPythonPackage rec { + pname = "s2clientprotocol"; + version = "3.19.1.58600.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "02jqwdfj5zpag4c5nf0707qmwk7sqm98yfgrd19rq6pi58zgl74f"; + }; + + patches = [ ./pure-version.patch ]; + + buildInputs = [ protobuf ]; + + meta = { + description = "StarCraft II - client protocol."; + homepage = "https://github.com/Blizzard/sc2client-proto"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ danharaj ]; + }; +} diff --git a/pkgs/development/python-modules/s2clientprotocol/pure-version.patch b/pkgs/development/python-modules/s2clientprotocol/pure-version.patch new file mode 100644 index 000000000000..43675c3bb11c --- /dev/null +++ b/pkgs/development/python-modules/s2clientprotocol/pure-version.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index 89131a8..19527df 100755 +--- a/setup.py ++++ b/setup.py +@@ -13,8 +13,6 @@ from distutils.spawn import find_executable + from setuptools import setup + from setuptools.command.build_py import build_py + +-import gameversion_autogen as ver +- + SETUP_DIR = os.path.dirname(os.path.abspath(__file__)) + PROTO_DIR = os.path.join(SETUP_DIR, 's2clientprotocol') + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 42245162f50d..8931f6b346fb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7184,6 +7184,7 @@ in { meta.broken = true; # Tests fail, and no reverse-dependencies anyway }; + s2clientprotocol = callPackage ../development/python-modules/s2clientprotocol { }; statsd = buildPythonPackage rec { name = "statsd-${version}";