-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding nix flake for development to project
- Loading branch information
1 parent
5f2c978
commit 4d7d396
Showing
5 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Add environment variables here to be available in development session. | ||
# Example: export SECRET_TOKEN=01234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
inputs = { | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
in { | ||
devShell = pkgs.mkShell { | ||
buildInputs = [ | ||
pkgs.cargo-watch | ||
pkgs.iconv | ||
pkgs.just | ||
pkgs.nerdfonts | ||
pkgs.rustup | ||
pkgs.starship | ||
]; | ||
shellHook = '' | ||
source .env | ||
rustup default stable | ||
eval "$(starship init bash)" | ||
''; | ||
}; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
build *ARGS: | ||
cargo build {{ARGS}} | ||
|
||
check *ARGS: | ||
cargo check {{ARGS}} | ||
|
||
clean *ARGS: | ||
cargo clean {{ARGS}} | ||
|
||
format *ARGS: | ||
cargo format {{ARGS}} | ||
|
||
lint *ARGS: | ||
cargo lint {{ARGS}} | ||
|
||
run *ARGS: | ||
cargo run {{ARGS}} | ||
|
||
test *ARGS: | ||
cargo test {{ARGS}} | ||
|
||
watch *ARGS: | ||
cargo watch {{ARGS}} |