Skip to content

trivial-builders: add onlyBin - #266544

Merged
risicle merged 1 commit into
NixOS:masterfrom
risicle:ris-trivial-only-bin
Dec 3, 2023
Merged

risicle merged 1 commit into
NixOS:masterfrom
risicle:ris-trivial-only-bin

Conversation

@risicle

@risicle risicle commented Nov 9, 2023

Copy link
Copy Markdown
Contributor

Description of changes

Use-case described in comment, but the particular situation that spurred this was realizing that awscli injects its PYTHONPACKAGES into a nix-shell, clearly undesirable for python developers, and because awscli isn't a split-output package (python packages have problems with split-bin, another subject) this can't be worked around by just using awscli.bin.

Even if it were readily fixable for a particular package, it's very inconvenient for an end-user to have to modify an upstream package, particularly if it's heavily depended-upon and causes a lot of rebuilds.

With this, it's possible to do nix-shell -p 'onlyBin awscli' and have a clean PYTHONPATH.

Things done

  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

@ofborg ofborg Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 9, 2023

@lilyinstarlight lilyinstarlight left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onlyBin builder looks good to me implementation-wise and it helps with Python stuff! (e.g. desktopToDarwinBundle setup hook not working with packages that rely on a non-default Python, which I want to use this trivial builder to fix)

I think someone with more authority/knowledge over our trivial builders should review this more authoritatively, however, before merge

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Nov 16, 2023
@risicle
risicle force-pushed the ris-trivial-only-bin branch from a860c26 to 035d1e2 Compare December 2, 2023 14:47
@risicle

risicle commented Dec 2, 2023 •

Copy link
Copy Markdown
Contributor Author

@ofborg eval

@risicle
risicle merged commit a20f062 into NixOS:master Dec 3, 2023
@lilyinstarlight lilyinstarlight mentioned this pull request Sep 19, 2024
5 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants