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