Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add nix flake support #108

Closed
wants to merge 3 commits into from
Closed

feat: add nix flake support #108

wants to merge 3 commits into from

Conversation

bachrc
Copy link

@bachrc bachrc commented Dec 23, 2023

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Author

bachrc commented Jan 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants