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

buildPythonPackage: document why we always propagate python #179318

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

teto
Copy link
Member

@teto teto commented Jun 27, 2022

python applications should not propagate python in PATH but we do it
nevertheless to avoid rebuilds see #170887
for an explanation.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

python applications should not propagate python in PATH but we do it
nevertheless to avoid rebuilds see NixOS#170887
for an explanation.
@veprbl
Copy link
Member

veprbl commented Jun 27, 2022

I don't think that few extra rebuilds is such a big issue here. What's probably is a real issue is that those rebuilds might require the applications to stop providing the python modules and vice versa. Otherwise we may get double references if both the pythonPackage and its tooling are pulled in by a derivation.

@FRidh FRidh merged commit de50d08 into NixOS:master Jun 27, 2022
@FRidh
Copy link
Member

FRidh commented Jun 27, 2022

I don't think that few extra rebuilds is such a big issue here. What's probably is a real issue is that those rebuilds might require the applications to stop providing the python modules and vice versa. Otherwise we may get double references if both the pythonPackage and its tooling are pulled in by a derivation.

Simply wrapping applications with another derivation would mean a tiny additional derivation instead of a larger rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants