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.9.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-4tIkwfqFKERVQMB9nGwGfdMtxCWm3q4hrSWnEqA0qd8=";
22 };
23
24 nativeBuildInputs = [ hatchling ];
25
26 propagatedBuildInputs =
27 [
28 httpx
29 ]
30 ++ lib.optionals (pythonOlder "3.11") [ typing-extensions ]
31 ++ httpx.optional-dependencies.http2;
32
33 pythonImportsCheck = [ "gotenberg_client" ];
34
35 meta = with lib; {
36 description = "Python client for interfacing with the Gotenberg API";
37 homepage = "https://github.com/stumpylog/gotenberg-client";
38 changelog = "https://github.com/stumpylog/gotenberg-client/blob/${version}/CHANGELOG.md";
39 license = licenses.mpl20;
40 maintainers = with maintainers; [ leona ];
41 };
42}