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 flake #8

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Add nix flake #8

merged 1 commit into from
Jun 19, 2024

Conversation

silky
Copy link
Contributor

@silky silky commented Jun 17, 2024

Thanks for this nice project! I wanted to run it via Nix, so I added a flake.

The project can now be run with:

nix run .

:)

Note that this also adds a devShell, but doesn't add any of the pre-commit hooks. I'll leave that to someone else who might be interested in actually hacking on this project.

Copy link
Owner

@Tenzer Tenzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing!

I'd prefer to not have the .envrc and .gitignore changes included. I use direnv myself and have added .direnv to my local gitignore file to make sure my .envrc file and .direnv/ folder don't get added. See also https://sebastiandedeyne.com/setting-up-a-global-gitignore-file/.

As for the Flake configuration, I don't have much experience with flakes myself. What needs to be done to maintain this configuration? Does it need to be edited/regenerated if/when a new dependency is added or updated? How would I do that?

Could you add a line to README.md about how you would run/install Alga via Nix, please?

Thanks again!

@silky
Copy link
Contributor Author

silky commented Jun 18, 2024

I'd prefer to not have the .envrc and .gitignore changes included

Done.

I use direnv myself and have added .direnv to my local gitignore file to make sure my .envrc file and
.direnv/ folder don't get added. See also https://sebastiandedeyne.com/setting-up-a-global-gitignore-file/.

For what it's worth, it's idiomatic these days to have a .envrc in the repo itself.

What needs to be done to maintain this configuration? Does it need to be
edited/regenerated if/when a new dependency is added or updated?

It's manually constructed.

Ideally, no changes are required as new dependencies come in; you can see it reads the deps from the pyproject.yaml file itself. However, it turns out sometimes packages are not present on nixpkgs, in which case they need to be manually added, as I've done with the cfgs package.

CI could be set up to do that, if one wished ...

Could you add a line to README.md about how you would run/install Alga via Nix, please?

Done! :)

The project can now be run with:

```
nix run .
```

:)
@silky silky force-pushed the noon/add-nix-flake branch from a4e77a0 to 1c54ba1 Compare June 18, 2024 08:31
@Tenzer
Copy link
Owner

Tenzer commented Jun 19, 2024

Thank you!

@Tenzer Tenzer merged commit 2f88a8b into Tenzer:main Jun 19, 2024
9 checks passed
@silky silky deleted the noon/add-nix-flake branch June 20, 2024 05:39
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