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

fix: update brew instructions #1789

Closed
wants to merge 1 commit into from
Closed

Conversation

pablogrs
Copy link

@pablogrs pablogrs commented Jan 21, 2025

Fix installation instructions using brew

Description

Current brew installation instructions do not work, this should fix it.

Requirements / Checklist

  • Read the Contributing Guidelines
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan.
    Issue number where discussion took place: #xxx
  • If this contains a font/glyph add its origin as background info below (e.g. URL)
  • Verified the license of any newly added font, glyph, or glyph set. License is: xxx

What does this Pull Request (PR) do?

Fix the installation instructions

How should this be manually tested?

Any background context you can provide?

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)

image

Current brew installation instructions do not work, this should fix it.
@Finii
Copy link
Collaborator

Finii commented Jan 21, 2025

Thanks for the PR.

You mean
brew install font-hack-nerd-font failed (like shown above) and then you tried
brew install --cask font-hack-nerd-font and that succeeded?

@Finii
Copy link
Collaborator

Finii commented Jan 21, 2025

See the discussion at

As for the link, not sure why you want to change it away from the Github repo, which is the source of the casks.

  • 96542aa doc: Correct moved Homebrew repo in readme.md

@pablogrs
Copy link
Author

pablogrs commented Jan 21, 2025

Thanks for the reply, I've tried adding the tap but without success, maybe I am adding a wrong one, but I didn't see it in the installation instructions either.
image

When installing with --cask it works (it works on my machine case?)
image

edit: since I mentioned machine

➜  ~ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.1 LTS
Release:	24.04
Codename:	noble

➜  ~ brew --version
Homebrew 4.4.17

@Finii
Copy link
Collaborator

Finii commented Jan 22, 2025

Hmm, you use brew tab homebrew/cask-fonts, where did you get that?

That tap is deprecated, see https://github.com/Homebrew/homebrew-cask-fonts
and all the fonts are now in the 'default' tap.
96542aa doc: Correct moved Homebrew repo in readme.md

maybe I am adding a wrong one, but I didn't see it in the installation instructions either

You do not need to add any tap.

Distributor ID: Ubuntu

Ah, you use Linux and not MacOS, I'll fire up the other machine, hold tight....

fini@Mac ~ % brew --version
Homebrew 4.4.17-15-g662a229
fini@Mac ~ % brew tap
fini@Mac ~ % brew search hack-nerd
==> Formulae
hackrf

==> Casks
font-hack-nerd-font                                                                                      hackmd
fini@Mac ~ %
fini@Mac ~ % brew info font-hack-nerd-font
==> font-hack-nerd-font: 3.3.0
https://github.com/ryanoasis/nerd-fonts
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/font/font-h/font-hack-nerd-font.rb
==> Name
Hack Nerd Font (Hack)
==> Description
None
==> Artifacts
HackNerdFont-Bold.ttf (Font)
HackNerdFont-BoldItalic.ttf (Font)
HackNerdFont-Italic.ttf (Font)
HackNerdFont-Regular.ttf (Font)
HackNerdFontMono-Bold.ttf (Font)
HackNerdFontMono-BoldItalic.ttf (Font)
HackNerdFontMono-Italic.ttf (Font)
HackNerdFontMono-Regular.ttf (Font)
HackNerdFontPropo-Bold.ttf (Font)
HackNerdFontPropo-BoldItalic.ttf (Font)
HackNerdFontPropo-Italic.ttf (Font)
HackNerdFontPropo-Regular.ttf (Font)
==> Analytics
install: 6,025 (30 days), 18,952 (90 days), 48,590 (365 days)
fini@Mac ~ %

@Finii
Copy link
Collaborator

Finii commented Jan 22, 2025

Note to self

Where I did the brew info above, where did the description go?
Obviously its not in the cask 🤔

Screenshot 2025-01-22 at 07 40 15

@pablogrs
Copy link
Author

Thank you very much for following this up, it has to be an issue with my installation, I cannot see the same results as your commands.
image
I installed homebrew normally from brew.sh

The cask name I got it from here, but I should have read to the end, where it says there is no need for a cask anymore.

@pablogrs
Copy link
Author

maybe my brew installation is wrong

@pablogrs pablogrs closed this Jan 27, 2025
@pablogrs pablogrs deleted the patch-1 branch January 27, 2025 11:40
@Finii
Copy link
Collaborator

Finii commented Jan 29, 2025

Thank you very much for following this up, it has to be an issue with my installation, I cannot see the same results as your commands.

I am confused. I said "Oh you use Ubuntu and not MacOS, let me try" and then I show ... my commands on a Macbook Air? 🤔 Maybe I intended to check it also on Ubuntu? And forgot or got sidetracked or someone walked into my office 🤔

image
Running on Ubuntu 24.04 after fresh brew.sh install

Ah I remember something like casks are not (normally) supported under Linux, but only formulae... Let me check...

@Finii
Copy link
Collaborator

Finii commented Jan 29, 2025

Casks are 'MacOS binary packages', and thus are not available on Linux. Which is unfortunate in the case of fonts 🤔

That's the reason you need --cask because casks are not considered on Linux.

I guess ;-) I can not find any explicit documentation. Doing a cask update on Linux is also not possible, I stumbled about that before: ... Cant find the Issue/Pull. Whatever.

image


So, at least until that changes we should probably hint that in the readme section. I will change it thus.
Thanks for the input and continued discussion 💚

Finii added a commit that referenced this pull request Jan 29, 2025
[why]
If people want to use Homebrew on Linux to install the fonts they fail
following the documentation.

The reason is that Casks are not normally considered on Linux, because
they contain binary blobs for MacOS by definition. Well, the fonts are
indeed binaries, but could still be installed on any platform.

I can not find any expressive statement in the Homebrew or Homebrew-Cask
documentation, but trying on MacOS 15.3 and Ubuntu 24.04 showed this
different behavior.

[how]
Add back the `--cask` but only as addition for Linux, because
 - Main users of Homebrew are MacOS, and there it is deprecated
 - It might change on the Linux platform as well (for fonts?)

[note]
PR #1789
PR #1079

Reported-by: Pablo Sanchez @pablogrs
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii
Copy link
Collaborator

Finii commented Jan 29, 2025

@allcontributors please add @pablogrs for doc

Copy link
Contributor

@Finii

I've put up a pull request to add @pablogrs! 🎉

@Finii
Copy link
Collaborator

Finii commented Jan 29, 2025

Here the not-supported message for Casks on Linux, that has obviously changed (partially):

image

#1079

See also

So according to the homebrew-linux-fonts, on Linux you tap it, and then get the fonts as Formulae (autotranslated).
Imho the fonts should have been Formulae to begin with, but 🤷
I think the solution for us with --cask is better as no tapping is required and it lines up more closely the MacOS workflow.

Edit: Add Issue 82 link which also contains information collected here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants