From 6002f755d928da80d0f8160b4d6cdcee7ed478f9 Mon Sep 17 00:00:00 2001 From: Harinn Date: Wed, 15 Jul 2026 12:29:24 +0700 Subject: [PATCH] python3Packages.clickhouse-driver: modernize --- .../python-modules/clickhouse-driver/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/clickhouse-driver/default.nix b/pkgs/development/python-modules/clickhouse-driver/default.nix index f625c0989d9d..d5678f897d31 100644 --- a/pkgs/development/python-modules/clickhouse-driver/default.nix +++ b/pkgs/development/python-modules/clickhouse-driver/default.nix @@ -15,16 +15,18 @@ zstd, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "clickhouse-driver"; version = "0.2.10"; pyproject = true; + __structuredAttrs = true; + # pypi source doesn't contain tests src = fetchFromGitHub { owner = "mymarilyn"; repo = "clickhouse-driver"; - rev = version; + tag = finalAttrs.version; hash = "sha256-veFkmXAp8b6/Npt7f1EhMfM9OKlLugKtlXS+zMHWAro="; }; @@ -53,7 +55,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py \ - --replace "lz4<=3.0.1" "lz4<=4" + --replace-fail "lz4<=3.0.1" "lz4<=4" ''; # remove source to prevent pytest testing source instead of the build artifacts @@ -77,4 +79,4 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ breakds ]; }; -} +})