1{
2 lib,
3 agate,
4 buildPythonPackage,
5 dbt-core,
6 psycopg2,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage {
12 pname = "dbt-postgres";
13 pyproject = true;
14
15 inherit (dbt-core) version src;
16
17 disabled = pythonOlder "3.7";
18
19 sourceRoot = "${dbt-core.src.name}/plugins/postgres";
20
21 env.DBT_PSYCOPG2_NAME = "psycopg2";
22
23 build-system = [ setuptools ];
24
25 dependencies = [
26 agate
27 dbt-core
28 psycopg2
29 ];
30
31 # tests exist for the dbt tool but not for this package specifically
32 doCheck = false;
33
34 pythonImportsCheck = [ "dbt.adapters.postgres" ];
35
36 meta = with lib; {
37 description = "Plugin enabling dbt to work with a Postgres database";
38 homepage = "https://github.com/dbt-labs/dbt-core";
39 license = licenses.asl20;
40 maintainers = with maintainers; [ tjni ];
41 };
42}