1{
2 lib,
3 agate,
4 buildPythonPackage,
5 fetchFromGitHub,
6 dbt-adapters,
7 dbt-common,
8 dbt-core,
9 hatchling,
10 psycopg2,
11 pythonOlder,
12}:
13
14buildPythonPackage rec {
15 pname = "dbt-postgres";
16 version = "1.9.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.9";
20
21 src = fetchFromGitHub {
22 owner = "dbt-labs";
23 repo = "dbt-postgres";
24 tag = "v${version}";
25 hash = "sha256-lywWf78rluX17D5bcfehHd7X18tAdw3HZ65v440jETc=";
26 };
27
28 build-system = [ hatchling ];
29
30 pythonRemoveDeps = [ "psycopg2-binary" ];
31
32 dependencies = [
33 agate
34 dbt-adapters
35 dbt-common
36 dbt-core
37 psycopg2
38 ];
39
40 # tests exist for the dbt tool but not for this package specifically
41 doCheck = false;
42
43 pythonImportsCheck = [ "dbt.adapters.postgres" ];
44
45 meta = with lib; {
46 description = "Plugin enabling dbt to work with a Postgres database";
47 homepage = "https://github.com/dbt-labs/dbt-core";
48 license = licenses.asl20;
49 maintainers = with maintainers; [ tjni ];
50 };
51}