Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 96 lines 1.9 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 pythonOlder, 6 7 # build-system 8 hatchling, 9 10 # dependencies 11 agate, 12 colorama, 13 deepdiff, 14 isodate, 15 jinja2, 16 jsonschema, 17 mashumaro, 18 pathspec, 19 protobuf, 20 python-dateutil, 21 requests, 22 typing-extensions, 23 24 # tests 25 pytestCheckHook, 26 pytest-mock, 27 pytest-xdist, 28}: 29 30buildPythonPackage rec { 31 pname = "dbt-common"; 32 version = "1.12.0"; 33 pyproject = true; 34 35 disabled = pythonOlder "3.9"; 36 37 src = fetchFromGitHub { 38 owner = "dbt-labs"; 39 repo = "dbt-common"; 40 # Unfortunately, upstream doesn't tag commits on GitHub, and the pypi source 41 # doesn't include tests. TODO: Write an update script that will detect the 42 # version from `dbt_common/__about__.py`. 43 rev = "5a401a9e8dd46e4582ac4edd2883e34714e77530"; 44 hash = "sha256-SIMg6ewnE6kY+drqcPlYrxt1XlWBurZU62FI/QnHAHY="; 45 }; 46 47 patches = [ 48 # https://github.com/dbt-labs/dbt-common/pull/211 49 ./protobuf_5.patch 50 ]; 51 52 build-system = [ hatchling ]; 53 54 pythonRelaxDeps = [ 55 "agate" 56 "deepdiff" 57 ]; 58 59 dependencies = [ 60 agate 61 colorama 62 deepdiff 63 isodate 64 jinja2 65 jsonschema 66 mashumaro 67 pathspec 68 protobuf 69 python-dateutil 70 requests 71 typing-extensions 72 ] ++ mashumaro.optional-dependencies.msgpack; 73 74 nativeCheckInputs = [ 75 pytestCheckHook 76 pytest-xdist 77 pytest-mock 78 ]; 79 80 disabledTests = [ 81 # Assertion errors (TODO: Notify upstream) 82 "test_create_print_json" 83 "test_events" 84 "test_extra_dict_on_event" 85 ]; 86 87 pythonImportsCheck = [ "dbt_common" ]; 88 89 meta = { 90 description = "Shared common utilities for dbt-core and adapter implementations use"; 91 homepage = "https://github.com/dbt-labs/dbt-common"; 92 changelog = "https://github.com/dbt-labs/dbt-common/blob/${version}/CHANGELOG.md"; 93 license = lib.licenses.asl20; 94 maintainers = [ ]; 95 }; 96}