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.13.1";
21 pyproject = true;
22
23 disabled = pythonOlder "3.8";
24
25 src = fetchFromGitHub {
26 owner = "RobertCraigie";
27 repo = "prisma-client-py";
28 rev = "refs/tags/v${version}";
29 hash = "sha256-7pibexiFsyrwC6rVv0CGHRbQU4G3rOXVhQW/7c/vKJA=";
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 ] ++ lib.optionals (pythonOlder "3.11") [ strenum ];
44
45 # Building the client requires network access
46 doCheck = false;
47
48 pythonImportsCheck = [ "prisma" ];
49
50 meta = with lib; {
51 description = "Auto-generated and fully type-safe database client for prisma";
52 homepage = "https://github.com/RobertCraigie/prisma-client-py";
53 changelog = "https://github.com/RobertCraigie/prisma-client-py/releases/tag/v${version}";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ fab ];
56 };
57}