Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew livecheck fails to install bundler gems #35

Open
ian-h-chamberlain opened this issue Oct 5, 2024 · 1 comment
Open

brew livecheck fails to install bundler gems #35

ian-h-chamberlain opened this issue Oct 5, 2024 · 1 comment

Comments

@ian-h-chamberlain
Copy link

I suppose this is kind of expected, since normally brew installs its own dependencies when running some development commands for the first time, but is not allowed to modify the nix store:

$ brew livecheck --debug kde-mac/kde/kdeconnect
Error: Permission denied @ rb_sysopen - /nix/store/v19ip7y08262kadi01g4wnrr8cxd9qbx-brew-4.3.5-patched/Library/Homebrew/vendor/bundle/ruby/3.3.0/.homebrew_vendor_version
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/nix/store/v19ip7y08262kadi01g4wnrr8cxd9qbx-brew-4.3.5-patched/Library/Homebrew/utils/gems.rb:296:in `write'
/nix/store/v19ip7y08262kadi01g4wnrr8cxd9qbx-brew-4.3.5-patched/Library/Homebrew/utils/gems.rb:296:in `write'
/nix/store/v19ip7y08262kadi01g4wnrr8cxd9qbx-brew-4.3.5-patched/Library/Homebrew/utils/gems.rb:296:in `install_bundler_gems!'
/nix/store/v19ip7y08262kadi01g4wnrr8cxd9qbx-brew-4.3.5-patched/Library/Homebrew/dev-cmd/livecheck.rb:52:in `run'
/opt/homebrew/Library/Homebrew/brew.rb:92:in `<main>'

Is there some workaround I can use to either

  • preinstall the necessary dependencies in the patched brew (maybe a new nix-homebrew.setupCommands or something that can run some commands to install gems?)
  • tell brew to install in some other location, or give it a mutable directory to install stuff to?
@zhaofengli
Copy link
Owner

Well, this is tricky... I think the second way sounds nicer, but I don't have a strong opinion on this.

For reference, we patch Brew to use the bundled gems from upstream with a Nix-managed Ruby interpreter here: e88b940

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 a pull request may close this issue.

2 participants