Skip to content

Commit 0443b98

Browse files
buildPython*: unconditionally add .override
To be able to splice, we can't fail to eval before returning an attribute set. By checking for f ? override, we need to force f which isn't always possible, whereas mirrorFunctionArgs serves as an indirection which wraps the inner thunks in an attribute set that can always be returned. Fortunately, there should be no case when f evaluates successfully and does not have the override attribute, so we can just remove the condition. This fixes evaluation of buildPython* based packages in certain splicing situations by being lazier. An example of this is pkgsCross.ghcjs.buildPackages.nixpkgs-openjdk-updater on staging right now (ff5098e).
1 parent 81a3742 commit 0443b98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkgs/development/interpreters/python/python-packages-base.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let
3939
else
4040
result
4141
)
42-
// lib.optionalAttrs (f ? override) {
42+
// {
4343
# Support overriding `f` itself, e.g. `buildPythonPackage.override { }`.
4444
# Ensure `makeOverridablePythonPackage` is applied to the result.
4545
override = lib.mirrorFunctionArgs f.override (fdrv: makeOverridablePythonPackage (f.override fdrv));

0 commit comments

Comments
 (0)