2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, agate
|
2024-02-29 20:09:43 +00:00
|
|
|
, buildPythonPackage
|
2023-08-04 22:07:22 +00:00
|
|
|
, dbt-core
|
|
|
|
, psycopg2
|
2024-02-29 20:09:43 +00:00
|
|
|
, 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-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
agate
|
|
|
|
dbt-core
|
|
|
|
psycopg2
|
|
|
|
];
|
|
|
|
|
|
|
|
# tests exist for the dbt tool but not for this package specifically
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"dbt.adapters.postgres"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|