about summary refs log tree commit diff
path: root/pkgs/development/python-modules/dbt-common/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/dbt-common/default.nix')
-rw-r--r--pkgs/development/python-modules/dbt-common/default.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/dbt-common/default.nix b/pkgs/development/python-modules/dbt-common/default.nix
new file mode 100644
index 0000000000000..be12462648451
--- /dev/null
+++ b/pkgs/development/python-modules/dbt-common/default.nix
@@ -0,0 +1,65 @@
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  hatchling,
+  agate,
+  colorama,
+  isodate,
+  jinja2,
+  jsonschema,
+  mashumaro,
+  pathspec,
+  protobuf,
+  python-dateutil,
+  requests,
+  typing-extensions,
+  pytest-mock,
+  pytest-xdist,
+  pytestCheckHook,
+}:
+
+buildPythonPackage rec {
+  pname = "dbt-common";
+  version = "1.3.0";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "dbt-labs";
+    repo = "dbt-common";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-3UjwQy257ks21fQV0uZNKu5EsuzjlIAEcVtRWkR9x/4=";
+  };
+
+  build-system = [ hatchling ];
+
+  dependencies = [
+    agate
+    colorama
+    isodate
+    jinja2
+    jsonschema
+    mashumaro
+    pathspec
+    protobuf
+    python-dateutil
+    requests
+    typing-extensions
+  ] ++ mashumaro.optional-dependencies.msgpack;
+
+  pythonImportsCheck = [ "dbt_common" ];
+
+  nativeCheckInputs = [
+    pytest-mock
+    pytest-xdist
+    pytestCheckHook
+  ];
+
+  meta = {
+    description = "Shared common utilities for dbt-core and adapter implementations use";
+    homepage = "https://github.com/dbt-labs/dbt-common";
+    changelog = "https://github.com/dbt-labs/dbt-common/blob/${src.rev}/CHANGELOG.md";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ ];
+  };
+}