Skip to content

juspay/just-flake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

project chat

just-flake

Use just in your Nix devShells with re-usable and share-able targets.

Warning

Module options API is subject to change.

Usage

Add the following to your flake-parts based flake.nix after importing this module:

# In flake-parts' perSystem
{
  just-flake.features = {
    treefmt.enable = true;
    rust.enable = true;
    convco.enable = true;
    hello = {
      enable = true;
      justfile = ''
        hello:
        echo Hello World
      '';
    };
  };
}

This will add a shellHook that generates a just-flake.just symlink (which should be gitignore'ed). Use that by creating a justfile as follows:

# See flake.nix (just-flake)
import 'just-flake.just'

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

Then, add config.just-flake.outputs.devShell to the inputsFrom of your devShell.

Resulting devShell banner and/or output of running just:

🍎🍎 Run 'just <recipe>' to get started
Available recipes:
    changelog # Generate CHANGELOG.md using recent commits
    default   # Display the list of recipes
    fmt       # Auto-format the source tree using treefmt
    hello
    test      # Run and watch 'cargo test'
    w         # Compile and watch the project

Examples

About

Use `just` in your Nix devShells with re-usable and share-able targets.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages