From 007088359e7a0b438f42387cb59c0479ba81df83 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 17 Aug 2024 10:58:13 +0200 Subject: [PATCH] python3: break infinite recursion Checking if bluez is a derivation requires evaluating whether an emulator is available (in the case that gobject-introspection is available), which when cross compiling requires evaluating qemu, which requires evaluating libxml2, which requires evaluating Python. The recursion break happens in the Python expression because it's the thing behaving unusually, by forcing evaluation of all of its arguments, even ones that are optional and unused. Fixes: 8b3a4a617e54 ("bluez: fix when gobject-introspection unsupported") --- pkgs/development/interpreters/python/cpython/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 4128edeaa532..d753942e019f 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -130,7 +130,8 @@ let passthru = let # When we override the interpreter we also need to override the spliced versions of the interpreter - inputs' = lib.filterAttrs (n: v: ! lib.isDerivation v && n != "passthruFun") inputs; + # bluez is excluded manually to break an infinite recursion. + inputs' = lib.filterAttrs (n: v: n != "bluez" && n != "passthruFun" && ! lib.isDerivation v) inputs; override = attr: let python = attr.override (inputs' // { self = python; }); in python; in passthruFun rec { inherit self sourceVersion packageOverrides;