2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
agate,
|
|
|
|
buildPythonPackage,
|
|
|
|
dbt-core,
|
|
|
|
psycopg2,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
pname = "dbt-postgres";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
inherit (dbt-core) version src;
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
sourceRoot = "${dbt-core.src.name}/plugins/postgres";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
env.DBT_PSYCOPG2_NAME = "psycopg2";
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-08-04 22:07:22 +00:00
|
|
|
agate
|
|
|
|
dbt-core
|
|
|
|
psycopg2
|
|
|
|
];
|
|
|
|
|
|
|
|
# tests exist for the dbt tool but not for this package specifically
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "dbt.adapters.postgres" ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Plugin enabling dbt to work with a Postgres database";
|
|
|
|
homepage = "https://github.com/dbt-labs/dbt-core";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ tjni ];
|
|
|
|
};
|
|
|
|
}
|