From 881ea516cf552fbb159aed4462873762a8297409 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 21 Apr 2022 18:05:36 +1200 Subject: [PATCH] python3: Whitelist config options when overriding interpreter In the case of cross compilation we don't want pass through build inputs from the cross platform, but we do want to pass on config options. --- 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 23c85942ad70..4463dc8e9ba0 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -85,7 +85,8 @@ let passthru = let # When we override the interpreter we also need to override the spliced versions of the interpreter - override = attr: let python = attr.override (inputs // { self = python; }); in python; + inputs' = lib.filterAttrs (_: v: ! lib.isDerivation v) inputs; + override = attr: let python = attr.override (inputs' // { self = python; }); in python; in passthruFun rec { inherit self sourceVersion packageOverrides; implementation = "cpython";