-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
flake/dev: add nixvim-init command (under 'init' shell command) #2468
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "nixvim-init" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
clap = "4.5.20" | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
pkgs, | ||
}: | ||
pkgs.rustPlatform.buildRustPackage { | ||
pname = "nixvim-init"; | ||
version = "nightly"; | ||
|
||
src = ./.; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally, This means if Usually, you'd do something like That said, this is a minor issue and we're already doing this in most of our other derivations, so it shouldn't block the PR if you'd rather keep it as-is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, very good to know. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still prefer having sources and nix files separate, (I don't think it has any downsides?), but I won't press on the issue. |
||
|
||
cargoHash = "sha256-Y4Y5nNfYhfj80+DeCwjee0nRBctO1M9dJ0DwhGfkdF0="; | ||
|
||
meta.mainProgram = "nixvim-init"; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
println!("Hello, world!"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oooh we doin rust now :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a huge noob, but I just want to do a simple There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not opposed to learning a bit of rust for this, just conscious I already have to improve my python to properly be capable of maintaining our other in-tree scripts... 😅 |
||
} |
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'd suggest using
clap = { version = "4.5.20", features = ["derive"] }
, it's quite a bit more ergonomicThere 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.
Ok thanks ! Actually, I don't even think that we will need clap at all.
Good to know though.
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 think we'll probably end wanting some decent argument parsing and help-text at some point...
Even if we have a mostly interactive UX it'd still be nice to be able to do things via CLI args.