oppiliappan / statix

lints and suggestions for the nix programming language
https://git.peppe.rs/languages/statix/about
MIT License
557 stars 21 forks source link

Support brew and/or cargo #24

Closed delneg closed 2 years ago

delneg commented 2 years ago

Hello, is it possible to get this tool to crates.io and/or homebrew ? That would streamline the installation process greatly (because if I don't use nix on a mac, I have to build it from source). Thanks in advance!

SuperSandro2000 commented 2 years ago

You should be able to clone the source and do cargo build.

delneg commented 2 years ago

That's what I've been referring to as 'build from source', that's nor easy (I've to have rust / cargo installed & configured) nor is it user-friendly

oppiliappan commented 2 years ago

If I understand, you are looking for a pre-built binary of sorts? I think crates.io does not support such a thing (installing from crates.io with cargo install statix would still build from scratch). I am not familiar with homebrew/taps, but that should be doable.

I haven't really thought about supporting other package managers, but if you'd like, I can help get a darwin output for statix on nixpkgs.

delneg commented 2 years ago

Yep, you understood correctly. It would be nice to at least do cargo install statix and not git clone -> build -> link. Regarding homebrew - here's some guides I managed to find:

step by step one https://betterprogramming.pub/a-step-by-step-guide-to-create-homebrew-taps-from-github-repos-f33d3755ba74 official https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap

So, all in all it requires creating a ruby 'description file' in a separate repo, specifying the deps & release tag and that should be it. I'll probably be able to help testing it also

chenrui333 commented 2 years ago

I just filed a PR to include this tool into homebrew-core registry, feel free to comment on that PR. Thanks!

oppiliappan commented 2 years ago

That is amazing @chenrui333, much appreciated!

oppiliappan commented 2 years ago

It would be nice to at least do cargo install statix and not git clone -> build -> link.

@delneg you can do cargo install --git https://github.com/nerdypepper/statix and skip through the cloning/linking bits.

delneg commented 2 years ago

It would be nice to at least do cargo install statix and not git clone -> build -> link.

@delneg you can do cargo install --git https://github.com/nerdypepper/statix and skip through the cloning/linking bits.

Thanks, didn't know that it's possible with cargo. Probably a good idea to include that into README together with brew instruction when the PR gets merged

chenrui333 commented 2 years ago

Now the homebrew-core PR has been merged, just filed a docs PR to include brew install guide.

oppiliappan commented 2 years ago

Thanks for working on this @chenrui333!

chenrui333 commented 2 years ago

my pleasure :)