-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
52 lines (39 loc) · 974 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# justfile
# cheatsheet: https://cheatography.com/linux-china/cheat-sheets/justfile/
# define alias
# set options
set positional-arguments := true
# default recipe to display help information
default:
@just --list
# build pkg
build pkg:
@nom build .#{{ pkg }}
# check version
version pkg:
@./result/bin/{{ pkg }} --version
# update all flake inputs
update:
@nix flake update
# show flake
show:
@nix flake show
# check flake
check:
@nix flake check
# apply fix from linters
lint:
@statix fix --ignore 'templates/' .
@deadnix --edit --exclude 'templates/' .
# update a particular flake input
update-input input:
@nix flake lock --update-input {{ input }}
# nix-prefetch-url
prefetch-url url:
@nix-prefetch-url --type sha256 '{{ url }}' | xargs nix hash to-sri --type sha256
# nix-prefetch-git
prefetch-git repo rev:
@nix-prefetch-git --url '[email protected]:{{ repo }}' --rev '{{ rev }}' --fetch-submodules
# stage all files
add:
@git add .