1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 hatchling,
7 httpx,
8 typing-extensions,
9}:
10buildPythonPackage rec {
11 pname = "gotenberg-client";
12 version = "0.10.0";
13 pyproject = true;
14
15 disabled = pythonOlder "3.9";
16
17 src = fetchFromGitHub {
18 owner = "stumpylog";
19 repo = "gotenberg-client";
20 tag = version;
21 hash = "sha256-eDYgKbNeNCIdENo6DVmcABRwP5JUMCJW7NtbPOA5aqg=";
22 };
23
24 nativeBuildInputs = [ hatchling ];
25
26 propagatedBuildInputs = [
27 httpx
28 ]
29 ++ lib.optionals (pythonOlder "3.11") [ typing-extensions ]
30 ++ httpx.optional-dependencies.http2;
31
32 pythonImportsCheck = [ "gotenberg_client" ];
33
34 meta = with lib; {
35 description = "Python client for interfacing with the Gotenberg API";
36 homepage = "https://github.com/stumpylog/gotenberg-client";
37 changelog = "https://github.com/stumpylog/gotenberg-client/blob/${src.tag}/CHANGELOG.md";
38 license = licenses.mpl20;
39 maintainers = with maintainers; [ leona ];
40 };
41}