Skip to content

auto-patchelf: Don't use buildPythonApplication#353270

Merged
Scrumplex merged 1 commit intoNixOS:stagingfrom
adisbladis:auto-patchelf-dont-propagate
Nov 3, 2024
Merged

auto-patchelf: Don't use buildPythonApplication#353270
Scrumplex merged 1 commit intoNixOS:stagingfrom
adisbladis:auto-patchelf-dont-propagate

Conversation

@adisbladis
Copy link
Member

@adisbladis adisbladis commented Nov 3, 2024

Things done

#340162 introduced autoPatchelfHook as it's own top-level attribute. This also made it use the Nixpkgs Python build infrastructure, which relies on dependency propagation, leaking Python as a dependency into many builds erroneously.

This change uses a withPackages constructed environment instead, and manually patches the script shebangs, not triggering the buildPython* dependency propagation mechanism

  • Built on platform(s)
    • x86_64-linux
    • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

@adisbladis adisbladis mentioned this pull request Nov 3, 2024
13 tasks
@nix-owners nix-owners bot requested a review from layus November 3, 2024 03:21
@mweinelt mweinelt added this to the 24.11 milestone Nov 3, 2024
NixOS#340162 introduced `autoPatchelfHook` as it's own top-level attribute.
This also made it use the Nixpkgs Python build infrastructure, which relies on dependency propagation, leaking Python as a dependency into many builds erroneously.

This change uses a `withPackages` constructed environment instead, and manually patches the script shebangs, not triggering the `buildPython*` dependency propagation mechanism
@adisbladis adisbladis force-pushed the auto-patchelf-dont-propagate branch from d12fae8 to 687371a Compare November 3, 2024 03:44
@Scrumplex Scrumplex merged commit 4113cc0 into NixOS:staging Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants