Files
nixpkgs/pkgs/development/python-modules/googletrans/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

37 lines
852 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
hatchling,
httpx,
}:
buildPythonPackage rec {
pname = "googletrans";
version = "4.0.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-2e8Sa12S+r7sC7ndzb7s1Dhl/ADhfx36B3F4N4J6F94=";
};
build-system = [ hatchling ];
dependencies = [ httpx ] ++ httpx.optional-dependencies.http2;
# Majority of tests just try to ping Google's Translate API endpoint
doCheck = false;
pythonImportsCheck = [ "googletrans" ];
meta = {
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 = lib.licenses.mit;
maintainers = with lib.maintainers; [ unode ];
mainProgram = "translate";
};
}