Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildPython*: minor changes to prepare for restructuring #378566

Merged
merged 3 commits into from
Feb 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pkgs/development/interpreters/python/mk-python-derivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,9 @@ in
...
}@attrs:

assert (pyproject != null) -> (format == null);

let
format' =
assert (pyproject != null) -> (format == null);
if pyproject != null then
if pyproject then "pyproject" else "other"
else if format != null then
Expand Down Expand Up @@ -274,6 +273,7 @@ let
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
self = toPythonModule (
stdenv.mkDerivation (
finalAttrs:
(cleanAttrs attrs)
// {

Expand Down Expand Up @@ -400,13 +400,12 @@ let
{
inherit disabled;
}
// attrs.passthru or { }
// {
updateScript =
let
filename = head (splitString ":" self.meta.position);
filename = head (splitString ":" finalAttrs.finalPackage.meta.position);
in
attrs.passthru.updateScript or [
[
update-python-libraries
filename
];
Expand All @@ -419,7 +418,8 @@ let
}
// optionalAttrs (build-system != [ ]) {
inherit build-system;
};
}
// attrs.passthru or { };

meta = {
# default to python's platforms
Expand Down