d99kris / nchat

Terminal-based Telegram / WhatsApp client for Linux and macOS
MIT License
670 stars 47 forks source link

Add Homebrew support #119

Closed HawkingRadiation42 closed 1 year ago

HawkingRadiation42 commented 1 year ago

Description This pull request adds Homebrew support for nchat, making it easier for macOS users to install and manage the package using Homebrew. This is in continuation to the #91 discussion.

Changes Made

HawkingRadiation42 commented 1 year ago

any update on this?

d99kris commented 1 year ago

Hi @HawkingRadiation42 - thanks for the contribution and sorry about the delay. It's somewhere very high on my todo-list to look at this, but I've been busy with other things.

The reason it hasn't been merged more quickly is that I first wanted to check how other (upstream) maintainers manage brew packaging, if they do it in their main repository or separately.

Currently I don't maintain any packaging for my open source projects, and ideally I'd like to keep it that way. This one project (nchat) for this one packaging platform (brew mac) would probably be manageable short-term, but I would like to have a plan for the packaging to be managed elsewhere.

It would be neat if nchat was packaged as a brew core package by someone who has some spare time (nchat releases are quarterly). But I'm not sure if one can go that route directly, or if one needs to maintain own packaging for a while for brew to gauge the quality / seriousness of the project or something? Do you know?

I'll try to do some research on my side as well.

HawkingRadiation42 commented 1 year ago

Hi @d99kris, yes, I will try to add nchat directly to the brew core. I have added it to my to-do list and have also done some research regarding this.

d99kris commented 1 year ago

I've checked some other projects [1] not in brew core and they seem to generally maintain a separate repository for the brew recipe. I'd be OK doing that for time being, until it can be included in brew core.

[1]: Out of source brew recipies: https://github.com/jstkdng/ueberzugpp brew install jstkdng/programs/ueberzugpp https://github.com/remen/atlas brew install ariga/tap/atlas

Any ideas if there's some standard/more common path structure to use?

Otherwise I might set up a repository d99kris/taps which has a nchat directory, in which we can integrate your proposed brew formula.

HawkingRadiation42 commented 1 year ago

Setting up a repository, d99kris/taps, which has a 'nchat' directory, will work perfectly well until it's added to Brew Core.

d99kris commented 1 year ago

I found this https://docs.brew.sh/Manpage#tap-options-userrepo-url

tap [options] [user/repo] [URL]
Tap a formula repository. If no arguments are provided, list all installed taps.

With URL unspecified, tap a formula repository from GitHub using HTTPS. Since so many taps are hosted on GitHub, this command is a shortcut for brew tap user/repo https://github.com/user/homebrew-repo.

Based on this I've created a repository https://github.com/d99kris/homebrew-nchat for the formula and copied it there.

I still merged your PR for the README and so that your formula contribution counts, even though I'll remove it from the branch before merging to master.

d99kris commented 1 year ago

This has been merged to master now, thanks again for the contribution!