Skip to content

Instantly share code, notes, and snippets.

@mped-oticon
Created June 14, 2023 21:45
Show Gist options
  • Save mped-oticon/df1d705bc8144aa391f53820f1e4ec4f to your computer and use it in GitHub Desktop.
Save mped-oticon/df1d705bc8144aa391f53820f1e4ec4f to your computer and use it in GitHub Desktop.
justfile as a script, self-contained by Nix
eisbaw in kbnuxcsfw-mped in /scratch/fast_copy via ❄️ impure (shell)
❯ ./justfile
Available recipes:
help # Display the available commands
foo # This does FOO stuff
eisbaw in kbnuxcsfw-mped in /scratch/fast_copy via ❄️ impure (shell)
❯ ./justfile foo
echo bar
bar
eisbaw in kbnuxcsfw-mped in /scratch/fast_copy via ❄️ impure (shell)
❯ cat ./justfile
#! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/release-22.11.tar.gz -i "just --justfile" -p just
# Display the available commands
help:
@just --list --unsorted
# This does FOO stuff
foo:
echo bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment