Skip to content

Commit

Permalink
chore: Add just & just-flake
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Jul 10, 2024
1 parent 9741f8c commit 693128e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
.direnv
result
/just-flake.just
16 changes: 16 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
systems.url = "github:nix-systems/default";
rust-flake.url = "github:juspay/rust-flake";
rust-flake.inputs.nixpkgs.follows = "nixpkgs";
just-flake.url = "github:juspay/just-flake";

# Dev tools
treefmt-nix.url = "github:numtide/treefmt-nix";
Expand All @@ -20,6 +21,7 @@
systems = import inputs.systems;
imports = [
inputs.treefmt-nix.flakeModule
inputs.just-flake.flakeModule
inputs.rust-flake.flakeModules.default
inputs.rust-flake.flakeModules.nixpkgs
./module/flake-module.nix
Expand All @@ -42,6 +44,12 @@
CARGO_BUILD_RUSTFLAGS = "-C target-feature=+crt-static";
};

just-flake.features = {
treefmt.enable = true;
rust.enable = true;
# convco.enable = true;
};

# Add your auto-formatters here.
# cf. https://numtide.github.io/treefmt/
treefmt.config = {
Expand All @@ -53,10 +61,13 @@
};

devShells.default = pkgs.mkShell {
name = "nix-health";
packages = [ pkgs.cargo-watch ];
inputsFrom = [
self'.devShells.nix_health
config.treefmt.build.devShell
config.nix-health.outputs.devShell
config.just-flake.outputs.devShell
];
};
packages.default = self'.packages.nix_health.overrideAttrs ({
Expand Down
10 changes: 10 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See flake.nix (just-flake)
import 'just-flake.just'

# Display the list of recipes
default:
@just --list

# Run and re-run after re-compiling on change
run:
cargo watch -x run

0 comments on commit 693128e

Please sign in to comment.