nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 requests,
6 poetry-core,
7 keyring,
8}:
9
10buildPythonPackage rec {
11 pname = "deepl";
12 version = "1.27.0";
13 pyproject = true;
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-jYOlPZWP+pY4j17NZCWp2dkxFEwWwFx6hOzrmhRUu5I=";
18 };
19
20 nativeBuildInputs = [ poetry-core ];
21
22 propagatedBuildInputs = [
23 requests
24 keyring
25 ];
26
27 # Requires internet access and an API key
28 doCheck = false;
29
30 pythonImportsCheck = [ "deepl" ];
31
32 meta = {
33 description = "Language translation API that allows other computer programs to send texts and documents to DeepL's servers and receive high-quality translations";
34 mainProgram = "deepl";
35 homepage = "https://github.com/DeepLcom/deepl-python";
36 changelog = "https://github.com/DeepLcom/deepl-python/blob/v${version}/CHANGELOG.md";
37 license = lib.licenses.mit;
38 maintainers = with lib.maintainers; [ MaskedBelgian ];
39 };
40}