1{
2 lib,
3 buildPythonPackage,
4 dbt-core,
5 fetchPypi,
6 pytestCheckHook,
7 hatchling,
8 snowflake-connector-python,
9}:
10
11buildPythonPackage rec {
12 pname = "dbt-snowflake";
13 version = "1.10.2";
14 pyproject = true;
15
16 # missing tags on GitHub
17 src = fetchPypi {
18 pname = "dbt_snowflake";
19 inherit version;
20 hash = "sha256-7bq+IU7VAJLecv5JERXnxNtPY0I/6WSCyGedXCYoDLk=";
21 };
22
23 pythonRelaxDeps = [
24 "certifi"
25 ];
26
27 build-system = [ hatchling ];
28
29 dependencies = [
30 dbt-core
31 snowflake-connector-python
32 ]
33 ++ snowflake-connector-python.optional-dependencies.secure-local-storage;
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 enabledTestPaths = [ "tests/unit" ];
38
39 pytestFlagsArray = [
40 # pyproject.toml specifies -n auto which only pytest-xdist understands
41 "--override-ini addopts=''"
42 ];
43
44 pythonImportsCheck = [ "dbt.adapters.snowflake" ];
45
46 meta = {
47 description = "Plugin enabling dbt to work with Snowflake";
48 homepage = "https://github.com/dbt-labs/dbt-adapters/blob/main/dbt-snowflake";
49 changelog = "https://github.com/dbt-labs/dbt-adapters/blob/main/dbt-snowflake/CHANGELOG.md";
50 license = lib.licenses.asl20;
51 maintainers = with lib.maintainers; [ tjni ];
52 };
53}