diff options
Diffstat (limited to 'pkgs/development/python-modules/hikari/default.nix')
-rw-r--r-- | pkgs/development/python-modules/hikari/default.nix | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/pkgs/development/python-modules/hikari/default.nix b/pkgs/development/python-modules/hikari/default.nix index e76d7780c0bf..92a26c231d0c 100644 --- a/pkgs/development/python-modules/hikari/default.nix +++ b/pkgs/development/python-modules/hikari/default.nix @@ -1,29 +1,28 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pytestCheckHook -, pythonOlder -, pythonRelaxDepsHook -, pytest-runner -, aiohttp -, attrs -, multidict -, colorlog -, pynacl -, pytest-cov -, pytest-randomly -, pytest-asyncio -, mock +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + aiohttp, + attrs, + multidict, + colorlog, + pynacl, + pytest-cov-stub, + pytest-randomly, + pytest-asyncio, + mock, }: buildPythonPackage rec { pname = "hikari"; - version = "2.0.0.dev124"; + version = "2.1.0"; src = fetchFromGitHub { owner = "hikari-py"; repo = "hikari"; - rev = version; - hash = "sha256-zDgU3Ol/I3YNnwXm+aBh20KwonW746p5TObuwuWORog="; + rev = "refs/tags/${version}"; + hash = "sha256-/A3D3nG1lSCQU92dM+6YroxWlGKrv47ntkZaJZTAJUA="; # The git commit is part of the `hikari.__git_sha1__` original output; # leave that output the same in nixpkgs. Use the `.git` directory # to retrieve the commit SHA, and remove the directory afterwards, @@ -36,9 +35,6 @@ buildPythonPackage rec { ''; }; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; propagatedBuildInputs = [ aiohttp @@ -49,32 +45,32 @@ buildPythonPackage rec { pythonRelaxDeps = true; - passthru.optional-dependencies = { + optional-dependencies = { server = [ pynacl ]; }; nativeCheckInputs = [ pytestCheckHook - pytest-runner pytest-asyncio - pytest-cov + pytest-cov-stub pytest-randomly mock ]; - pythonImportChecks = [ "hikari" ]; + pythonImportsCheck = [ "hikari" ]; disabled = pythonOlder "3.7"; postPatch = '' - substituteInPlace hikari/_about.py --replace "__git_sha1__: typing.Final[str] = \"HEAD\"" "__git_sha1__: typing.Final[str] = \"$(cat $src/COMMIT)\"" + substituteInPlace hikari/_about.py \ + --replace-fail "__git_sha1__: typing.Final[str] = \"HEAD\"" "__git_sha1__: typing.Final[str] = \"$(cat $src/COMMIT)\"" ''; - meta = with lib; { + meta = { description = "Discord API wrapper for Python written with asyncio"; homepage = "https://www.hikari-py.dev/"; changelog = "https://github.com/hikari-py/hikari/releases/tag/${version}"; - license = licenses.mit; - maintainers = with maintainers; [ tomodachi94 ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ tomodachi94 sigmanificient ]; }; } |