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

Add nix support #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add nix support #519

wants to merge 1 commit into from

Conversation

acaloiaro
Copy link

This PR allows air to be a Flake input for Nix users who use air in their Go projects.

It also better supports air development by providing a development shell that contains all of air's developer dependencies.

I understand if this is not a priority for this project, and I'll continue maintaining my fork of air at acaloiaro/air if you choose not to directly support nix.

Cheers!

- Use air as a flake input
- Better support developers with a development shell containing dependencies
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (56d3d58) 69.22% compared to head (57f33b5) 69.50%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #519      +/-   ##
==========================================
+ Coverage   69.22%   69.50%   +0.27%     
==========================================
  Files           9        9              
  Lines        1082     1082              
==========================================
+ Hits          749      752       +3     
+ Misses        253      251       -2     
+ Partials       80       79       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cosmtrek
Copy link
Owner

@acaloiaro Thanks! Looks great, while I need some time to learn Nix firstly 😄

@acaloiaro
Copy link
Author

acaloiaro commented Jan 31, 2024

@acaloiaro Thanks! Looks great, while I need some time to learn Nix firstly 😄

Sounds good @cosmtrek. I'm happy to clarify anything if you have questions.

One thing worth considering for this PR is that it serves two uses cases: users and developers.

For users it makes air available as a "flake input" for nix projects that use air. E.g. this allows Nix Flake users to delcare air as an input to their system configurations (make it globablly available), or as an input to projects, so that air is available within that project's "development shell".

For air developers who are also nix users, it allows them to simply run nix develop to get a development shell with all of air's dependencies.

I joined these two user and developer use cases into a single PR, but they could be easy considered in isolation. Selfishly, as a nix user, I want both. But it would be reasonable as a project maintainer to consider them separately.

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.

None yet

2 participants