-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshell.nix
More file actions
73 lines (67 loc) · 1.88 KB
/
Copy pathshell.nix
File metadata and controls
73 lines (67 loc) · 1.88 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
pkgs ? import <nixpkgs> { },
checks ? { },
...
}:
let
hasPreCommit = checks ? pre-commit-check;
preCommitPackages = if hasPreCommit then checks.pre-commit-check.enabledPackages else [ ];
preCommitHook = if hasPreCommit then checks.pre-commit-check.shellHook else "";
in
pkgs.mkShell {
buildInputs = [ pkgs.bashInteractive ] ++ preCommitPackages;
inputsFrom = [ pkgs.wk ];
nativeBuildInputs = [
(pkgs.python3.withPackages (ps: [
ps.sphinx
ps.myst-parser
ps.furo
ps.sphinx-copybutton
ps.sphinx-prompt
ps.sphinx-autobuild
ps.sphinx-design
ps.sphinx-inline-tabs
]))
]
++ builtins.attrValues {
inherit (pkgs)
# Development tools
clang-tools
gdb
valgrind
# Build tools
pkg-config
wayland-scanner
# Version control
git
pre-commit
;
};
shellHook = ''
${preCommitHook}
echo ""
echo "wk development environment"
echo "=========================="
echo ""
echo "Build commands:"
echo " make - Build wk for X11 and Wayland"
echo " make x11 - Build wk for X11 only"
echo " make wayland - Build wk for Wayland only"
echo " make debug - Build with debug symbols"
echo " make test - Run test suite"
echo " make man - Build man pages"
echo " make clean - Clean build artifacts"
echo ""
echo "Documentation:"
echo " make docs-html - Build HTML docs"
echo " make docs-man - Build man pages from docs"
echo " make docs-serve - Serve docs at localhost:8000"
echo " make docs-live - Live rebuild+serve docs at localhost:8000"
echo ""
echo "Code quality:"
echo " pre-commit run --all-files - Run all pre-commit hooks"
echo " clang-format -i <file> - Format a C file"
echo " nix fmt - Format Nix files"
echo ""
'';
}