1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 hatchling, 8 9 # dependencies 10 agate, 11 colorama, 12 deepdiff, 13 isodate, 14 jinja2, 15 jsonschema, 16 mashumaro, 17 pathspec, 18 protobuf, 19 python-dateutil, 20 requests, 21 typing-extensions, 22 23 # tests 24 pytestCheckHook, 25 pytest-mock, 26 pytest-xdist, 27}: 28 29buildPythonPackage rec { 30 pname = "dbt-common"; 31 version = "1.23.0-unstable-2025-04-21"; 32 pyproject = true; 33 34 src = fetchFromGitHub { 35 owner = "dbt-labs"; 36 repo = pname; 37 rev = "03e09c01f20573975e8e17776a4b7c9088b3f212"; # They don't tag releases 38 hash = "sha256-KqnwlFZZRYuWRflMzjrqCPBnzY9q/pPhceM2DGqz5bw="; 39 }; 40 41 build-system = [ hatchling ]; 42 43 pythonRelaxDeps = [ 44 "agate" 45 "deepdiff" 46 # 0.6.x -> 0.7.2 doesn't seem too risky at a glance 47 # https://pypi.org/project/isodate/0.7.2/ 48 "isodate" 49 "protobuf" 50 ]; 51 52 dependencies = [ 53 agate 54 colorama 55 deepdiff 56 isodate 57 jinja2 58 jsonschema 59 mashumaro 60 pathspec 61 protobuf 62 python-dateutil 63 requests 64 typing-extensions 65 ] ++ mashumaro.optional-dependencies.msgpack; 66 67 nativeCheckInputs = [ 68 pytestCheckHook 69 pytest-xdist 70 pytest-mock 71 ]; 72 73 disabledTests = [ 74 # flaky test: https://github.com/dbt-labs/dbt-common/issues/280 75 "TestFindMatching" 76 ]; 77 78 pythonImportsCheck = [ "dbt_common" ]; 79 80 meta = { 81 description = "Shared common utilities for dbt-core and adapter implementations use"; 82 homepage = "https://github.com/dbt-labs/dbt-common"; 83 changelog = "https://github.com/dbt-labs/dbt-common/blob/${version}/CHANGELOG.md"; 84 license = lib.licenses.asl20; 85 maintainers = [ ]; 86 }; 87}