Repository navigation
trivial-builders: add onlyBin - #266544
Merged
Merged
Conversation
lilyinstarlight
approved these changes
Nov 16, 2023
lilyinstarlight
left a comment
Member
There was a problem hiding this comment.
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
pbsds
reviewed
Dec 2, 2023
risicle
force-pushed
the
ris-trivial-only-bin
branch
from
December 2, 2023 14:47
a860c26 to
035d1e2
Compare
Contributor
Author
|
@ofborg eval |
pbsds
approved these changes
Dec 3, 2023
5 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Use-case described in comment, but the particular situation that spurred this was realizing that
awscliinjects itsPYTHONPACKAGESinto a nix-shell, clearly undesirable for python developers, and becauseawscliisn't a split-output package (python packages have problems with split-bin, another subject) this can't be worked around by just usingawscli.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 cleanPYTHONPATH.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)