2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
agate,
|
|
|
|
buildPythonPackage,
|
2024-07-27 06:49:29 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
dbt-adapters,
|
|
|
|
dbt-common,
|
2024-06-05 15:53:02 +00:00
|
|
|
dbt-core,
|
2024-07-27 06:49:29 +00:00
|
|
|
hatchling,
|
2024-06-05 15:53:02 +00:00
|
|
|
psycopg2,
|
|
|
|
pythonOlder,
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
buildPythonPackage rec {
|
2023-08-04 22:07:22 +00:00
|
|
|
pname = "dbt-postgres";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.8.2";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dbt-labs";
|
|
|
|
repo = "dbt-postgres";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-E7Y2lY8aCiAZx5sLWwpOBLTrdOsCQAdWWJTvR2jGOaA=";
|
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
env.DBT_PSYCOPG2_NAME = "psycopg2";
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ hatchling ];
|
|
|
|
|
|
|
|
pythonRemoveDeps = [ "psycopg2-binary" ];
|
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
|
2024-07-27 06:49:29 +00:00
|
|
|
dbt-adapters
|
|
|
|
dbt-common
|
2023-08-04 22:07:22 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|