about summary refs log tree commit diff
path: root/pkgs/development/python-modules/googletrans/default.nix
blob: 1ed302a6c090868ad99bd7946aae4340fc37f030 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  requests,
}:

buildPythonPackage rec {
  pname = "googletrans";
  version = "2.4.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "ssut";
    repo = "py-googletrans";
    rev = "v${version}";
    sha256 = "0wzzinn0k9rfv9z1gmfk9l4kljyd4n6kizsjw4wjxv91kfhj92hz";
  };

  propagatedBuildInputs = [ requests ];

  # 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";
    homepage = "https://py-googletrans.readthedocs.io";
    license = licenses.mit;
    maintainers = with maintainers; [ unode ];
  };
}