diff --git a/pkgs/development/python-modules/googletrans/default.nix b/pkgs/development/python-modules/googletrans/default.nix index 9a73dd866014..07639c419e05 100644 --- a/pkgs/development/python-modules/googletrans/default.nix +++ b/pkgs/development/python-modules/googletrans/default.nix @@ -1,34 +1,36 @@ { lib, buildPythonPackage, - fetchFromGitHub, - requests, + fetchPypi, + hatchling, + httpx, }: buildPythonPackage rec { pname = "googletrans"; - version = "4.0.0"; - format = "setuptools"; + version = "4.0.2"; + pyproject = true; - src = fetchFromGitHub { - owner = "ssut"; - repo = "py-googletrans"; - tag = "v${version}"; - sha256 = "sha256-R6LJLHHitJL8maXBCZyx2W47uJh0ZctVDA9oRIEhG5U="; + src = fetchPypi { + inherit pname version; + hash = "sha256-2e8Sa12S+r7sC7ndzb7s1Dhl/ADhfx36B3F4N4J6F94="; }; - propagatedBuildInputs = [ requests ]; + build-system = [ hatchling ]; - # majority of tests just try to ping Google's Translate API endpoint + dependencies = [ httpx ] ++ httpx.optional-dependencies.http2; + + # Majority of tests just try to ping Google's Translate API endpoint doCheck = false; pythonImportsCheck = [ "googletrans" ]; meta = with lib; { - description = "Googletrans is python library to interact with Google Translate API"; - mainProgram = "translate"; + description = "Library to interact with Google Translate API"; homepage = "https://py-googletrans.readthedocs.io"; + changelog = "https://github.com/ssut/py-googletrans/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ unode ]; + mainProgram = "translate"; }; }