From 8dc6982eed0e065b95aef6afb124b6fc2d807ff8 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sat, 15 Nov 2025 18:08:31 -0500 Subject: [PATCH 1/2] python3Packages.dbt-common: add updateScript --- .../python-modules/dbt-common/default.nix | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/dbt-common/default.nix b/pkgs/development/python-modules/dbt-common/default.nix index 3f44d1da7e43..173edf5b5d1f 100644 --- a/pkgs/development/python-modules/dbt-common/default.nix +++ b/pkgs/development/python-modules/dbt-common/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + writeScript, # build-system hatchling, @@ -27,7 +28,7 @@ pytest-xdist, }: -buildPythonPackage { +buildPythonPackage rec { pname = "dbt-common"; version = "1.28.0-unstable-2025-08-14"; pyproject = true; @@ -80,6 +81,27 @@ buildPythonPackage { 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"; From b6244319e87bd90db3bff61bc7c7d57e1b2af127 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sat, 15 Nov 2025 18:12:25 -0500 Subject: [PATCH 2/2] python3Packages.dbt-common: 1.28.0-unstable-2025-08-14 -> 1.36.0-unstable-2025-11-10 Changelog: https://github.com/dbt-labs/dbt-common/blob/main/CHANGELOG.md --- pkgs/development/python-modules/dbt-common/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/dbt-common/default.nix b/pkgs/development/python-modules/dbt-common/default.nix index 173edf5b5d1f..a88166b0ee9b 100644 --- a/pkgs/development/python-modules/dbt-common/default.nix +++ b/pkgs/development/python-modules/dbt-common/default.nix @@ -30,25 +30,23 @@ buildPythonPackage rec { pname = "dbt-common"; - version = "1.28.0-unstable-2025-08-14"; + version = "1.36.0-unstable-2025-11-10"; pyproject = true; src = fetchFromGitHub { owner = "dbt-labs"; repo = "dbt-common"; - rev = "dd34e0a0565620863ff70c0b02421d84fcee8a02"; # They don't tag releases - hash = "sha256-hG6S+IIAR3Cu69oFapQUVoCdaiEQYeMQ/ekBuAXxPrI="; + rev = "e306773b935738838cedd52de762224330f9840e"; # They don't tag releases + hash = "sha256-LuM9St90M7yGIqYJZTNLNYGZ1Dva2o2z3Q6ZPw4HP8g="; }; build-system = [ hatchling ]; pythonRelaxDeps = [ "agate" - "deepdiff" # 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 = [