Readit News logoReadit News

Dead Comment

alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
NewJazz · 4 months ago
Just FYI you are describing a ports system, of which there are many. From macports, to alpine packages, to nixpkgs... Tons of research and automation in this area already. Would encourage looking at Nix and distri in particular. Many Nix packages can be built on/for macOS!

https://nixos.org/manual/nixpkgs/stable/#preface

https://michael.stapelberg.ch/posts/tags/distri/

alexykn · 4 months ago
I know nix, did use nix-darwin for a while and actually integrated my own scripts called from the flake into setting up my system xD
alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
godelski · 4 months ago
This is awesome!

Is there uv support?[0]

One of my biggest gripes about brew is how they manage dependencies. The devs have a conflicting philosophy that creates bloat. Package maintainers must define settings, settings should always use the latest Python version. It makes no sense. Maintainers won't update unless things break so you got a bunch of Python versions running around. And it won't use system Python!

Uv seems to provide an elegant solution for this. You can build a venv for each package and rust version will only have the specified deps. Since uv finds all your Python instances (and packages) and soft links them you have way less bloat and venvs become really useful. You can also use run and other tools to handle executables

Plus is also rust so good synergy ;)

[0] https://astral.sh/blog/uv

alexykn · 4 months ago
love uv <3 I will look into integrating that. Have not decided if and how to implement my own packaging / source build dsl though and will probably open a git poll for that the coming days
alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
alexykn · 4 months ago
Yeah, this would 100% be feasible. Great idea. It's during the week now so I don't have much time besides work.

I'll probably open a Poll on git within the next couple days about what to do about a real from source packaging system with it's own dsl, maybe just yaml/toml or something a bit more powerful like lua with mlua. No matter the choice of packaging apporach I would like to keep the generated packages "bottle compliant" -> at least with the json api spec, since this also installs from there.

There seems to be at least some in my project so even though I am very opinionated on a lot of things I don't think I should decide on that completely alone, especially given that this is the first time I play with packaging.

alexykn · 4 months ago
on github xD
alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
miki123211 · 4 months ago
> Build from source formulae is still pretty f*ed + I do not know if it is really feasible given that the json API lacks information there and a full on Ruby -> Rust transpiler is way out of scope. Will probably settle for automatic build system detection based on archive structure there. + Maybe do my own version of the .rb scripts but in a more general machine readable format, not .rs lol

Last I checked (which was about a year ago), Homebrew had ~7000 formulas (not including casks).

I think it would be feasible to transcribe most of them to your format of choice with AI, run the build in a loop and ask the LLM to fix errors, and reserve manual intervention for the few cases that the LLM can't fix.

alexykn · 4 months ago
Yeah, this would 100% be feasible. Great idea. It's during the week now so I don't have much time besides work.

I'll probably open a Poll on git within the next couple days about what to do about a real from source packaging system with it's own dsl, maybe just yaml/toml or something a bit more powerful like lua with mlua. No matter the choice of packaging apporach I would like to keep the generated packages "bottle compliant" -> at least with the json api spec, since this also installs from there.

There seems to be at least some in my project so even though I am very opinionated on a lot of things I don't think I should decide on that completely alone, especially given that this is the first time I play with packaging.

alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
3np · 4 months ago
> probably settle for automatic build system detection based on archive structure there

Please add knobs for the end user to manually configure this per package and global default before adding autodetection. As a user to is very frustrating to have to patch the package manager to override some well-intentioned automagic which didn't consider my setup or dig through sources to uncover some undocumented assumption. yarn is a cautionary example.

alexykn · 4 months ago
I'll add manual override flags and also let users not only build from source from formulae but any dir on their machine they want, only makes sense
alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
jdeaton · 4 months ago
Yeah i vote it should be rebranded “why”
alexykn · 4 months ago
command: why install htop, -> install start: because you wan' it -> done: you got it

Something like that you mean?

alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
whywhywhywhy · 4 months ago
Consider rebranding to a 4 letter name or even better a 3 letter one.

I know it sounds dumb but uv was smart to go shorter than pip and sapphire feels heavier than brew no matter what it does after typing that.

alexykn · 4 months ago
I know, probably will, also feel typing out sapphire for the command all the time is annoying + sapp would be weird. For me technical implementation comes first though. I'll do that when something comes to mind
alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
Scramblejams · 4 months ago
Cool project, good luck with it!

If I may surface one use case: Several years ago I had to manage a bunch of Macs for CI jobs. The build process (Unreal's UAT) didn't support running more than one build process at a time, and Docker was really slow, so I'd hoped to use different user accounts to bypass that and get some parallelization gains. Homebrew made that very difficult with its penchant for system-wide installs. So a feature request: I'd love to see a competitive package manager that limits itself to operating somewhere (overridable) in the user's home directory.

alexykn · 4 months ago
Initial idea for this really came from my dayjob too, we have macs but no way to centrally manage them. The client / server part for the declarative system manager I want to build on top of this is quite far out yet though. At least several months
alexykn commented on Sapphire: Rust based package manager for macOS   github.com/alexykn/sapphi... · Posted by u/adamnemecek
alexykn · 4 months ago
Anyway, please do not expect progress to be too rapid. I have a full time job and do most work on this on weekends. I fully intend to make it a stable, "finished" (as much as this is possible in software) thing, it will take a while though. If anyone want's to help out I do open the bugs I find as Issues to keep track and give people an idea of things that do not work. Good Night!

u/alexykn

KarmaCake day146April 22, 2025View Original