Change:
Steps to reproduce the behavior: Originally found building Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
That's not a build failure, but an evaluation failure. If you want to make not depend on , you need to figure out where does this dependency comes from, and try to remove it. The reason we disabled is documented in the code: Note that although the issue is fixed, we intentionally provide an expression for , so that we can build with it. See also: You can work around this issue by using instead, or try to be creative and make depend on the latest (and not ), by fixing the upstream issue . Good luck!
I'm closing this, as this is an upstream issue. Ideally it would have been possible to declaratively write with Nix why packages are disabled for certain Python implementation, and that would have improved the evaluation failure message you observed. I think I saw discussion about such a feature, but I can't find any links now unfortunately.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:

Discussion:
}: let <del> python3 = python311; </del> <ins> python3 = python311.override { self = python3; packageOverrides = _: super: { tree-sitter = super.tree-sitter_0_21; }; }; </ins> in python3.pkgs.buildPythonApplication rec { pname = "autotools-language-server";

<del> { lib , buildPythonPackage , fetchFromGitHub , setuptools-generate , setuptools-scm , colorama , jinja2 , jsonschema , pygls , tree-sitter0_21 , pytestCheckHook </del> <ins> { lib, buildPythonPackage, fetchFromGitHub, setuptools-generate, setuptools-scm, colorama, jinja2, jsonschema, pygls, tree-sitter, pytestCheckHook, </ins> }: buildPythonPackage rec {

jinja2 jsonschema pygls <del> # The build won't fail if we had used tree-sitter (version > 0.21), but # this package is only a dependency of autotools-language-server which also # depends on tree-sitter-languages which must use tree-sitter0_21 and not # tree-sitter. Hence we avoid different tree-sitter versions dependency # mismatch by defaulting here to this lower version. tree-sitter0_21 ]; nativeCheckInputs = [ pytestCheckHook </del> <ins> tree-sitter </ins> ]; <ins> nativeCheckInputs = [ pytestCheckHook ]; </ins> pythonImportsCheck = [ "lsp_tree_sitter" ];

pytestCheckHook syrupy time-machine <del> ] ++ lib.flatten (builtins.attrValues optional-dependencies); </del> <ins> tree-sitter ]; </ins> disabledTestPaths = [ # Snapshot tests require syrupy<4

<del> { lib , buildPythonPackage , fetchFromGitHub , setuptools , wheel , cython , tree-sitter0_21 , pytestCheckHook , python </del> <ins> { lib, buildPythonPackage, fetchFromGitHub, setuptools, cython, tree-sitter, pytestCheckHook, python, </ins> }: buildPythonPackage rec {

build-system = [ setuptools <del> wheel </del> cython ]; <del> dependencies = [ # https://github.com/grantjenks/py-tree-sitter-languages/issues/67 tree-sitter0_21 ]; </del> <ins> dependencies = [ tree-sitter ]; </ins> # Generate languages.so file (build won't fail without this, but tests will). preBuild = '' ${python.pythonOnBuildForHost.interpreter} build.py ''; <del> nativeCheckInputs = [ pytestCheckHook ]; </del> <ins> nativeCheckInputs = [ pytestCheckHook ]; </ins> # Without cd $out, tests fail to import the compiled cython extensions. # Without copying the ./tests/ directory to $out, pytest won't detect the # tests and run them. See also:

homepage = "https://github.com/grantjenks/py-tree-sitter-languages"; license = licenses.asl20; maintainers = with maintainers; [ doronbehar ]; <ins> # https://github.com/grantjenks/py-tree-sitter-languages/issues/67 broken = versionAtLeast tree-sitter.version "0.22"; </ins> }; }

<ins> { lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, pythonOlder, pythonAtLeast, setuptools, distutils, }: buildPythonPackage rec { pname = "tree-sitter"; version = "0.21.3"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "tree-sitter"; repo = "py-tree-sitter"; rev = "refs/tags/v${version}"; hash = "sha256-HT1sRzDFpeelWCq1ZMeRmoUg0a3SBR7bZKxBqn4fb2g="; fetchSubmodules = true; }; build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "tree_sitter" ]; # Needed explicitly for Python >= 3.12 as tree-sitter provides # calls to distutils functions to compile language files dependencies = lib.optionals (pythonAtLeast "3.12") [ distutils ]; preCheck = '' rm -r tree_sitter ''; meta = with lib; { description = "Python bindings to the Tree-sitter parsing library"; homepage = "https://github.com/tree-sitter/py-tree-sitter"; changelog = "https://github.com/tree-sitter/py-tree-sitter/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } </ins>

<del> { lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, pythonOlder, pythonAtLeast, setuptools, distutils, }: buildPythonPackage rec { pname = "tree-sitter0_21"; version = "0.21.3"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "tree-sitter"; repo = "py-tree-sitter"; rev = "refs/tags/v${version}"; hash = "sha256-HT1sRzDFpeelWCq1ZMeRmoUg0a3SBR7bZKxBqn4fb2g="; fetchSubmodules = true; }; build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "tree_sitter" ]; # Needed explicitly for Python >= 3.12 as tree-sitter provides # calls to distutils functions to compile language files dependencies = lib.optionals (pythonAtLeast "3.12") [ distutils ]; preCheck = '' rm -r tree_sitter ''; meta = with lib; { description = "Python bindings to the Tree-sitter parsing library"; homepage = "https://github.com/tree-sitter/py-tree-sitter"; changelog = "https://github.com/tree-sitter/py-tree-sitter/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } </del>

tree-sitter = callPackage ../development/python-modules/tree-sitter { }; <del> tree-sitter0_21 = callPackage ../development/python-modules/tree-sitter0_21 { }; </del> <ins> tree-sitter_0_21 = callPackage ../development/python-modules/tree-sitter/0_21.nix { }; </ins> tree-sitter-html = callPackage ../development/python-modules/tree-sitter-html { };