ruby-modules: eliminate BUNDLE_PATH #81612
Closed
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.
Newer versions of bundler use a "ruby scope" when installing into a
custom path (set via BUNDLE_PATH). For example, ruby 2.7 with bundler
2 will install gems into "$BUNDLE_PATH/ruby/2.7.0". This is not
compatible with setting bundler's path to $GEM_HOME, which contains
gems directly.
The ruby infrastructure doesn't need to direct bundler where to
install gems, only where to find already installed gems. The simplest
configuration that works with all current versions of ruby and bundler
is to stop using bundler's
path
, and rely on GEM_HOME and GEM_PATH.Motivation for this change
Make the ruby infrastructure nixpkgs compatible with bundler 2.
Related PRs and issues: #81442, #78242
I have not tested this beyond a few simple tests.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)