at master 2.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 agate, 11 click, 12 daff, 13 dbt-adapters, 14 dbt-common, 15 dbt-extractor, 16 dbt-protos, 17 dbt-semantic-interfaces, 18 jinja2, 19 logbook, 20 mashumaro, 21 networkx, 22 packaging, 23 pathspec, 24 protobuf, 25 pydantic, 26 pydantic-settings, 27 pytz, 28 pyyaml, 29 requests, 30 snowplow-tracker, 31 sqlparse, 32 typing-extensions, 33 34 # passthru 35 callPackage, 36}: 37 38buildPythonPackage rec { 39 pname = "dbt-core"; 40 version = "1.10.13"; 41 pyproject = true; 42 43 src = fetchFromGitHub { 44 owner = "dbt-labs"; 45 repo = "dbt-core"; 46 tag = "v${version}"; 47 hash = "sha256-uXuoOyo/F7eaZva45EARES9e8GpQJEz6ka39eLOhENE="; 48 }; 49 50 sourceRoot = "${src.name}/core"; 51 52 pythonRelaxDeps = [ 53 "agate" 54 "click" 55 "dbt-common" 56 "dbt-semantic-interfaces" 57 "logbook" 58 "mashumaro" 59 "networkx" 60 "pathspec" 61 "protobuf" 62 "pydantic" 63 "urllib3" 64 ]; 65 66 build-system = [ 67 setuptools 68 ]; 69 70 dependencies = [ 71 agate 72 click 73 daff 74 dbt-adapters 75 dbt-common 76 dbt-extractor 77 dbt-protos 78 dbt-semantic-interfaces 79 jinja2 80 logbook 81 mashumaro 82 networkx 83 packaging 84 pathspec 85 protobuf 86 pydantic 87 pydantic-settings 88 pytz 89 pyyaml 90 requests 91 snowplow-tracker 92 sqlparse 93 typing-extensions 94 ] 95 ++ mashumaro.optional-dependencies.msgpack; 96 97 # tests exist for the dbt tool but not for this package specifically 98 doCheck = false; 99 100 passthru = { 101 withAdapters = callPackage ./with-adapters.nix { }; 102 }; 103 104 meta = { 105 description = "Enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications"; 106 longDescription = '' 107 The dbt tool needs adapters to data sources in order to work. The available 108 adapters are: 109 110 dbt-bigquery 111 dbt-postgres 112 dbt-redshift 113 dbt-snowflake 114 115 An example of building this package with a few adapters: 116 117 dbt.withAdapters (adapters: [ 118 adapters.dbt-bigquery 119 adapters.dbt-postgres 120 ]) 121 ''; 122 homepage = "https://github.com/dbt-labs/dbt-core"; 123 changelog = "https://github.com/dbt-labs/dbt-core/blob/${src.tag}/CHANGELOG.md"; 124 license = lib.licenses.asl20; 125 maintainers = with lib.maintainers; [ 126 mausch 127 tjni 128 ]; 129 mainProgram = "dbt"; 130 }; 131}