hawk icon indicating copy to clipboard operation
hawk copied to clipboard

Homebrew Formula

Open 0xflotus opened this issue 4 years ago • 13 comments

Is it possible to make it installable via Homebrew for Mac OS?

0xflotus avatar Dec 11 '20 13:12 0xflotus

That would be pretty cool. What's the process for being added to homebrew? I assume it's like for a Linux distro, in which the person maintaining the distro's entry is typically different from the person maintaining the package? Would you like to be that person?

gelisam avatar Dec 11 '20 17:12 gelisam

I'm not sure, I've never done that before and I don't know the haskell ecosystem well.

0xflotus avatar Dec 11 '20 18:12 0xflotus

I'm familiar with (and can help with) the Haskell part, it's the Homebrew part I would need help with

gelisam avatar Dec 11 '20 22:12 gelisam

I have also no experience in writing Homebrew Formulas, I know it's Ruby Code and I think this is a good starting point: Formula Cookbook

Are there any precompiled binaries of hawk for Mac OS?

0xflotus avatar Dec 12 '20 13:12 0xflotus

Actually cabal-install v1 is deprecated on the homebrew side recently, see this issue. So you might need to update to use calbal v2 commands first. I can help with the homebrew formula creation.

chenrui333 avatar Dec 14 '20 01:12 chenrui333

I can help with the homebrew formula creation

Excellent, thanks for volunteering to help! I will ping you once I figure out how to switch to cabal-v2. I know I should have upgraded ages ago, but unfortunately there are some deep interactions which are not that easy to fix.

gelisam avatar Dec 14 '20 02:12 gelisam

Are there any precompiled binaries of hawk for Mac OS?

I don't think that would do you much good, because hawk relies on a Haskell compiler already being installed (which I'm sure homebrew can help with), and relies on the package database created during compilation to determine which Haskell packages should be made available to the Haskell expressions given to hawk on the command-line.

gelisam avatar Dec 14 '20 02:12 gelisam

I can help with the homebrew formula creation

Excellent, thanks for volunteering to help! I will ping you once I figure out how to switch to cabal-v2. I know I should have upgraded ages ago, but unfortunately there are some deep interactions which are not that easy to fix.

That sounds great!

chenrui333 avatar Dec 27 '20 04:12 chenrui333

@chenrui333 as of #242, hawk now supports cabal-v2! I had to make some assumptions about the folder in which it and the relevant package databases are installed, so if brew needs to install things in a non-standard location, we might have to tweak that logic a bit.

Another potential issue is #225: hawk was written for ghc-8.4.4, and some work is needed to make it compatible with a more recent version. ghc-8.4.4 is far from being the most recent version of ghc, so it might not be as simple as having brew install ghc and then hawk.

Yet another potential issue i #246: hawk expects to be able to run ghc-8.4.4 just by running "ghc" in the shell, meaning that ghc-8.4.4 needs to be in the PATH. I assume that brew would prefer to give hawk the path to the ghc-8.4.4 it installed?

gelisam avatar Jan 04 '21 13:01 gelisam

Sounds good, I will take a shot now.

chenrui333 avatar Jan 11 '21 02:01 chenrui333

Yet another potential issue i #246: hawk expects to be able to run ghc-8.4.4 just by running "ghc" in the shell, meaning that ghc-8.4.4 needs to be in the PATH. I assume that brew would prefer to give hawk the path to the ghc-8.4.4 it installed?

This is actually a dealbreaker, there is no [email protected] support on the homebrew side (as I just checked)

chenrui333 avatar Jan 11 '21 02:01 chenrui333

Ok, I'll let you know once I manage to upgrade to the latest GHC

gelisam avatar Jan 11 '21 14:01 gelisam

hawk now supports ghc-8.8.4 up through ghc-9.0.1! I assume that's better?

gelisam avatar Mar 16 '21 03:03 gelisam