1{
2 lib,
3 buildPythonPackage,
4 click,
5 fetchFromGitHub,
6 httpx,
7 jinja2,
8 nodeenv,
9 pydantic,
10 python-dotenv,
11 pythonOlder,
12 setuptools,
13 strenum,
14 tomlkit,
15 typing-extensions,
16}:
17
18buildPythonPackage rec {
19 pname = "prisma";
20 version = "0.15.0";
21 pyproject = true;
22
23 disabled = pythonOlder "3.8";
24
25 src = fetchFromGitHub {
26 owner = "RobertCraigie";
27 repo = "prisma-client-py";
28 tag = "v${version}";
29 hash = "sha256-F+Up1HHslralt3NvZZ/wT+CKvzKOjhEEuMEeT0L6NZM=";
30 };
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 click
36 httpx
37 jinja2
38 nodeenv
39 pydantic
40 python-dotenv
41 tomlkit
42 typing-extensions
43 ]
44 ++ lib.optionals (pythonOlder "3.11") [ strenum ];
45
46 # Building the client requires network access
47 doCheck = false;
48
49 pythonImportsCheck = [ "prisma" ];
50
51 meta = with lib; {
52 description = "Auto-generated and fully type-safe database client for prisma";
53 homepage = "https://github.com/RobertCraigie/prisma-client-py";
54 changelog = "https://github.com/RobertCraigie/prisma-client-py/releases/tag/v${version}";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ fab ];
57 };
58}