Something went wrong. Try again.
lol
Something went wrong. Try again.
2.5 kB · 111 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{ lib, buildPythonPackage, fetchFromGitHub, writeScript,
# build-system hatchling,
# dependencies dbt-protos, agate, colorama, deepdiff, isodate, jinja2, jsonschema, mashumaro, pathspec, protobuf, python-dateutil, requests, typing-extensions,
# tests pytestCheckHook, pytest-mock, pytest-xdist,}:
buildPythonPackage rec { pname = "dbt-common"; version = "1.37.3-unstable-2026-03-27"; pyproject = true;
src = fetchFromGitHub { owner = "dbt-labs"; repo = "dbt-common"; rev = "db4a7b70486b5337bf0e387260211a418ac36936"; # They don't tag releases hash = "sha256-FcnCg05z9yalhAU1eueZ0x+YEuAfCeYSUlecoEQvS6k="; };
build-system = [ hatchling ];
pythonRelaxDeps = [ "agate" # 0.6.x -> 0.7.2 doesn't seem too risky at a glance # https://pypi.org/project/isodate/0.7.2/ "isodate" "protobuf" ];
dependencies = [ dbt-protos agate colorama deepdiff isodate jinja2 jsonschema mashumaro pathspec protobuf python-dateutil requests typing-extensions ] ++ mashumaro.optional-dependencies.msgpack;
nativeCheckInputs = [ pytestCheckHook pytest-xdist pytest-mock ];
disabledTests = [ # flaky test: https://github.com/dbt-labs/dbt-common/issues/280 "TestFindMatching" ];
pythonImportsCheck = [ "dbt_common" ];
passthru.updateScript = writeScript "update-dbt-common" '' #!/usr/bin/env nix-shell #!nix-shell -i bash -p git common-updater-scripts perl
tmpdir="$(mktemp -d)" git clone --depth=1 "${src.gitRepoUrl}" "$tmpdir"
pushd "$tmpdir"
newVersionNumber=$(perl -pe 's/version = "([\d.]+)"/$1/' dbt_common/__about__.py | tr -d '\n') newRevision=$(git show -s --pretty='format:%H') newDate=$(git show -s --pretty='format:%cs') newVersion="$newVersionNumber-unstable-$newDate" popd
rm -rf "$tmpdir" update-source-version --rev="$newRevision" "python3Packages.dbt-common" "$newVersion" perl -pe 's/^(.*version = ")([\d\.]+)(.*)$/''${1}'"''${newVersion}"'";/' \ -i 'pkgs/development/python-modules/dbt-common/default.nix' '';
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/main/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = [ ]; };}