jacobdeichert / mask

🎭 A CLI task runner defined by a simple markdown file
MIT License
1.1k stars 55 forks source link

feat: add nix flake support #108

Closed bachrc closed 10 months ago

bachrc commented 10 months ago

Describe the solution

Nix is a package manager which, technically, can handle build in any language.

This flake.nix file is basically giving all the steps to build and import mask in their own flakes.

People can then, with the nix package manager, use mask right from this repository:

nix run "github:jacobdeichert/mask" -- --help

You can test it with my PR repository:

nix run "github:bachrc/mask" -- --help

Even if Mask is already available on the nixpkgs repository, but this flake remove any dependency on the nixpkgs repository system (time for the PR to be merged, etc.)

This flake also allows to have a dev environment with every needed dependency :

nix develop "github:jacobdeichert/mask"

The .envrc file enables integration with direnv, which basically triggers a nix develop when entering the folder (and then sets up the right build inputs versions)

I added a rust-toolchain.toml file which specifies the rust version needed to build the project. The nix flake is based on it in order to build it.

Your project is really great and I'm happy to contribute in any way to it! Please contact me if you need any changes

jacobdeichert commented 10 months ago

Hey, thanks for the PR! I don't have enough time to review it right now, but I expect to get to it within the next month or two.

It would be great if you could link to one or more popular Rust projects that have this exact same setup for me to reference. Since I'm not aware of how common this is, proof of other projects doing this might help me understand this better. Thanks!

jacobdeichert commented 10 months ago

Hey again, thanks for your interest in mask! However, I've decided not to merge this PR.

After looking at a few other CLI projects on GitHub, none of the ones I looked at have included flake support. And after reviewing the committed files, this is not something I feel comfortable maintaining.

bachrc commented 10 months ago

Okay, I totally understand. Please have a great day. :)