1{
2 lib,
3 agate,
4 boto3,
5 buildPythonPackage,
6 dbt-core,
7 dbt-postgres,
8 fetchFromGitHub,
9 pytestCheckHook,
10 pythonOlder,
11 redshift-connector,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "dbt-redshift";
17 version = "1.9.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.10";
21
22 src = fetchFromGitHub {
23 owner = "dbt-labs";
24 repo = "dbt-redshift";
25 tag = "v${version}";
26 hash = "sha256-ayt5KRH3jAoi7k+0yfk1ZSqG4qsM+zny8tDnWOWO5oA=";
27 };
28
29 pythonRelaxDeps = [
30 "boto3"
31 "redshift-connector"
32 ];
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 agate
38 boto3
39 dbt-core
40 dbt-postgres
41 redshift-connector
42 ];
43
44 nativeCheckInputs = [ pytestCheckHook ];
45
46 enabledTestPaths = [ "tests/unit" ];
47
48 pythonImportsCheck = [ "dbt.adapters.redshift" ];
49
50 meta = with lib; {
51 description = "Plugin enabling dbt to work with Amazon Redshift";
52 homepage = "https://github.com/dbt-labs/dbt-redshift";
53 changelog = "https://github.com/dbt-labs/dbt-redshift/blob/${version}/CHANGELOG.md";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ tjni ];
56 };
57}