Skip to content

buildPython*: make name-related attributes overridable via overrideAttrs#376714

Merged
mweinelt merged 1 commit intoNixOS:stagingfrom
ShamrockLee:build-python-direct-overriding-name
Feb 8, 2025
Merged

buildPython*: make name-related attributes overridable via overrideAttrs#376714
mweinelt merged 1 commit intoNixOS:stagingfrom
ShamrockLee:build-python-direct-overriding-name

Conversation

@ShamrockLee
Copy link
Contributor

@ShamrockLee ShamrockLee commented Jan 25, 2025

This PR makes the name attribute of Python packages (built with buildPython*) reflect the pname and version overriding performed by <pkg>.overrideAttrs.

This change itself doesn't inherently cause mass rebuilds. However, it fixes the overriding functionality of python3Packages.pycryptodome. As python3Packages.pycryptodomex is defined by overriding python3Packages.pycryptodome via overrideAttrs, it changes (fixes) python3Packages.pycryptodomex.name and causes the rebuild of python3Packages.pycryptodomex and its reverse dependencies.

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/pycryptodomex/default.nix#L3-L4

Things done

  • Built on platform(s)
    • x86_64-linux (built python3Packages.pycryptodomex)
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jan 25, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. labels Jan 25, 2025
@ShamrockLee ShamrockLee force-pushed the build-python-direct-overriding-name branch from 4d22d5e to b3b430d Compare February 3, 2025 18:08
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Feb 3, 2025
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: kernel The Linux kernel 8.has: changelog This PR adds or changes release notes 6.topic: emacs Text editor 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: vim Advanced text editor 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: stdenv Standard environment 6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: cinnamon Desktop environment 6.topic: R R is a programming language for statistical computing and data visualization. 6.topic: vscode A free and versatile code editor that supports almost every major programming language. 6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab 6.topic: games Gaming on NixOS 6.topic: julia Julia is a high-level, high-performance dynamic language for technical computing. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 6.topic: flutter Open-source UI software development kit for cross-platform applications and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Feb 3, 2025
@github-actions github-actions bot removed 8.has: changelog This PR adds or changes release notes 6.topic: emacs Text editor 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: vim Advanced text editor 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: stdenv Standard environment 6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: cinnamon Desktop environment 6.topic: R R is a programming language for statistical computing and data visualization. 6.topic: vscode A free and versatile code editor that supports almost every major programming language. 6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab 6.topic: games Gaming on NixOS 6.topic: julia Julia is a high-level, high-performance dynamic language for technical computing. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 6.topic: flutter Open-source UI software development kit for cross-platform applications 6.topic: xen-project Issues and PRs related to the Xen Project Hypervisor. 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions labels Feb 3, 2025
Make name, pname and version overridable via overrideAttrs
for Python packgaes constructed with buildPython*.
@ShamrockLee ShamrockLee force-pushed the build-python-direct-overriding-name branch from b3b430d to c540331 Compare February 3, 2025 18:12
@ShamrockLee
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 376714


x86_64-linux

@ShamrockLee ShamrockLee marked this pull request as ready for review February 3, 2025 18:47
@nix-owners nix-owners bot requested review from mweinelt and natsukium February 3, 2025 18:48
@mweinelt mweinelt changed the title buildPython*: make name-relaed attributes overridable via overrideAttrs buildPython*: make name-related attributes overridable via overrideAttrs Feb 3, 2025
@mweinelt mweinelt merged commit d15ca73 into NixOS:staging Feb 8, 2025
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants