Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Fwiw you can use the Nix package manager (https://nixos.org/) on OS X to accomplish those same things. Lots of discussion about that the past few years:

https://google.com/?q=nix+on+mac+os+x

Nix has more packages than MacPorts - 60k vs 37.6k - though that's not necessarily a guarantee the ones you need are there.

And like MacPorts it doesn't do weird, non-Unix-y ownership changes of system directories like Homebrew does.



How is that better than a pm specifically designed for Mac?


I use Homebrew, and am genuinely appreciative of the amount of effort all the contributors have put in. However, as far as package managers go, it's kind of awful.

Homebrew excels as a mechanism to install the latest software, if you don't care about breaking things. However, traditionally a package manager's job is to ensure that if you've installed something, it'll continue to run.

If you've ever updated readline via Homebrew, you can pretty much just watch everything burn.

If you've ever tried to use an old version of Postgres, good luck. Particularly if you're wanting to mix and match versions of PostGIS.

If you're running an old version of macOS, you're out in the cold. Although, I must admit, recently this seems to be handled much better.


Also any random operation can take 20 minutes to complete if you haven't used brew in a while.


You can disable this but I agree, I hate it.

This comment actually just spurred me to find this (https://gist.github.com/jb510/99f12b1ac70f1cf8b780) which may fix the issue of forgetting to manually update.


I understand why they did it, but it’s super annoying.

Given the intervals between running Homebrew, you just know it’s going to spin for a minute or two updating every damn time you try to use it, usually when you want something installed fast.


Have you tried MacPorts?


Not in about 8 years. I do most of my development in Docker these days so tend to make use of Linux package managers.


MacPorts has been virtually flawless for me in the last 16 years. Worth a try.


It probably depends on what you want?

If you like treating your Mac like a very MacMacMac pet, a pm designed for Mac is probably better.

If you'd like to treat your Mac like UnixMac livestock, you probably want a cross-platform pm.

Using Nix means the core of my dev needs are met by config shared between my NixOS and macOS systems, with some idiomatic unshareable bits around the edges.

(I don't want to trivialize the gaps or over-sell Nix here. Nix forms a foundation for accomplishing this, but I do still have non-trivial bootstrap scripts for macOS.)


Are you talking about Homerew or MacPorts?


Unfortunately, Nixpkg doesn't check buildability on Darwin when merging PRs, so things can break quite often on the nixpkgs-unstable channel (compared to nixpkgs-unstable on Linux). It's not hard to rollback, though, but it does makes me never want to ever run `nix-channel --update`.


I feel similarly and am a little careful about when I choose to take an update.

That said, I think most people want darwin failures to be able to block, so it's mostly about getting on top of them to the point where it's practical to keep them triaged. Domen is working on getting a part-time position funded to work on issues here (https://opencollective.com/nix-macos), though individual package breaks are probably down the list.


nixpkgs CI does check for buildability on Darwin, which can be confirmed by looking at any of their PRs. However, packages do tend to be get marked as broken on Darwin if it doesn’t build and the packager doesn’t own a Mac.

I feel things have stabilized significantly in recent days, though. I haven’t had a single Darwin breakage on the unstable channel since the release of 20.09. Perhaps the Zero Hydra Failures effort[1] helped.

[1]: https://github.com/NixOS/nixpkgs/issues/97479


I think what I meant was darwin failure doesn't block.

Recently I had nomad breakage on -unstable caused by nvml support, which pulls in nvidia_x11, which pulls in linux_5_4, which of course not installable on darwin[1]. The maintainer fixed it very quickly (thank you!) but I still need to wait few more days for it to be included in -unstable.

[1]: https://github.com/NixOS/nixpkgs/issues/108603


Use one of the Darwin channels, that won't advance unless Darwin things are not too broken.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: