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