diff --git a/pkgs/by-name/ha/harlequin/package.nix b/pkgs/by-name/ha/harlequin/package.nix index 6a06668e656c..b12abb6b7a03 100644 --- a/pkgs/by-name/ha/harlequin/package.nix +++ b/pkgs/by-name/ha/harlequin/package.nix @@ -47,6 +47,7 @@ pythonPackages.buildPythonApplication rec { }; pythonRelaxDeps = [ + "click" "numpy" "pyarrow" "questionary" @@ -104,6 +105,10 @@ pythonPackages.buildPythonApplication rec { # Tests require network access "test_connect_extensions" "test_connect_prql" + + # Broken since click was updated to 8.2.1 in https://github.com/NixOS/nixpkgs/pull/448189 + # AssertionError + "test_bad_adapter_opt" ] ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ # Test incorrectly tries to load a dylib/so compiled for x86_64 diff --git a/pkgs/development/python-modules/sqlfmt/default.nix b/pkgs/development/python-modules/sqlfmt/default.nix index 2f1dff47901a..1acdfcfa0664 100644 --- a/pkgs/development/python-modules/sqlfmt/default.nix +++ b/pkgs/development/python-modules/sqlfmt/default.nix @@ -1,23 +1,33 @@ { lib, - black, buildPythonPackage, - click, fetchFromGitHub, - gitpython, + pythonOlder, + + # build-system + hatchling, + + # dependencies + click, jinja2, platformdirs, - poetry-core, + tqdm, + + # optional-dependencies + black, + gitpython, + + # tests + addBinToPathHook, pytest-asyncio, pytestCheckHook, - pythonOlder, - tqdm, + versionCheckHook, writableTmpDirAsHomeHook, }: buildPythonPackage rec { pname = "sqlfmt"; - version = "0.27.0"; + version = "0.28.1"; pyproject = true; disabled = pythonOlder "3.12"; @@ -26,11 +36,14 @@ buildPythonPackage rec { owner = "tconbeer"; repo = "sqlfmt"; tag = "v${version}"; - hash = "sha256-Yel9SB7KrDqtuZxNx4omz6u4AID8Fk5kFYKBEZD1fuU="; + hash = "sha256-H896Ey4iJFuvcLLvLilN/6nN4gxpvv3VJKIjivEDwMU="; }; - build-system = [ poetry-core ]; + build-system = [ hatchling ]; + pythonRelaxDeps = [ + "click" + ]; dependencies = [ click jinja2 @@ -43,18 +56,23 @@ buildPythonPackage rec { sqlfmt_primer = [ gitpython ]; }; + pythonImportsCheck = [ "sqlfmt" ]; + nativeCheckInputs = [ + addBinToPathHook pytest-asyncio pytestCheckHook + versionCheckHook writableTmpDirAsHomeHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); + versionCheckProgramArg = "--version"; - preCheck = '' - export PATH="$PATH:$out/bin"; - ''; - - pythonImportsCheck = [ "sqlfmt" ]; + disabledTestPaths = [ + # TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' + "tests/functional_tests/test_end_to_end.py" + "tests/unit_tests/test_cli.py" + ]; meta = { description = "Sqlfmt formats your dbt SQL files so you don't have to";