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

Commands brew formulae and brew casks don't work #30

Open
jan4843 opened this issue Jul 21, 2024 · 1 comment
Open

Commands brew formulae and brew casks don't work #30

jan4843 opened this issue Jul 21, 2024 · 1 comment

Comments

@jan4843
Copy link

jan4843 commented Jul 21, 2024

Running brew formulae or brew casks lead to no results:

$ brew formulae
$ brew casks

In a "normal" Homebrew installation (not from nix-homebrew), these commands list all installable formulae/casks.


The issue appears to be that taps in the library don't container the .rb files Homebrew searches for, but instead taps are symlinks to the Nix store that are not being followed.

$ ls -l /opt/homebrew/Library/Taps/homebrew
homebrew-bundle -> /nix/store/l516764g0zmq60byk30brfh3m1qaz7qm-source
homebrew-cask -> /nix/store/0niaj23lc0mlray8cr9l99yal8q5sb7g-source
homebrew-core -> /nix/store/iv0ccy11khh2766zv9ak0jlm0p3zzywv-source

Relevant files:


Patching items.sh to follow symlinks could work (find -L), but I'm not sure whether it's a good idea to accumulate patches for Homebrew. Might consider proposing getting this changed upstream, even though there would be no real use case there, I guess.

@jan4843
Copy link
Author

jan4843 commented Jul 21, 2024

Actually, find -L would not be sufficient.
There is another issue earlier where the Bash function homebrew-items would return early because of a check for directory including $HOMEBREW_REPOSITORY that gets expanded to /opt/homebrew/Library/.homebrew-is-managed-by-nix/Library/Taps, which does not exist.

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

No branches or pull requests

1 participant