Files
nixpkgs/pkgs/development/python-modules/googletrans/default.nix
T
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

30 lines
783 B
Nix

{ 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 ];
};
}