-
Notifications
You must be signed in to change notification settings - Fork 5
build: add nix flake #260
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
base: main
Are you sure you want to change the base?
build: add nix flake #260
Conversation
hi! I did this mostly as a learning exercise; feel free to close if nix is not a desired distribution or build mechanism. really excited about a sensible package manager for R! if this is desired for the project, you also might want not to include the lock file I guess. |
Thanks for the PR! I have less experience with nix flakes but get the appeal of the ecosystem. I will take a look around at some other projects to see what they are doing - if you have other examples that would be great as well. For example i love the atuin toolchain and they have a flake https://github.com/atuinsh/atuin/blob/main/flake.nix + lock. This definitely would be something to add and we very much appreciate the contribution. Is there anything we can do to test/show some evidence that this runs correctly. Would we also need an rv.nix file? |
flake.nix
Outdated
description = "A reproducible, fast and declarative package manager for R"; | ||
homepage = "https://github.com/A2-ai/rv"; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.btraven00 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't used Nix in 10 years so i could be completely wrong but should maintainers be defined somewhere first? Where is maintainers.btraven00 coming from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my assumption is that it's referencing the official list coming from the registry of nixpkgs maintainers in pkgs.lib.maintainers
. but leaving it blank (since I'm not in that list).
flake.nix
Outdated
buildInputs = [ | ||
rustToolchain | ||
pkgs.cargo-watch | ||
pkgs.ripgrep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need cargo-watch and ripgrep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for them, sorry. removed - I guess any extra tool useful for daily dev could be placed here if needed
what I was doing for testing is: nix build -j auto
nix run .# -- --version afaik |
Add Nix flake for reproducible builds and easy installation
This commit adds Nix flake support to enable reproducible builds and
simple installation via the Nix package manager. The flake:
With this change, users can install or run rv with
nix run github:A2-ai/rv
or get a development environment with
nix develop
.