forked from RadxaOS-SDK/rsdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevenv.nix
More file actions
75 lines (69 loc) · 1.36 KB
/
devenv.nix
File metadata and controls
75 lines (69 loc) · 1.36 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
74
75
{ pkgs, lib, config, ... }:
{
# https://devenv.sh/packages/
packages = with pkgs; [
aptly
bash-completion
cargo
commitizen
curl
dosfstools
file
git
gh
gptfdisk
guestfs-tools
jq
libguestfs-with-appliance
mdbook
mdbook-admonish
mdbook-cmdrun
mdbook-i18n-helpers
mdbook-linkcheck
mdbook-toc
multipath-tools
newt
parted
util-linux
wget
xz
yq
zx
];
enterShell = ''
export PATH=$PWD/src/bin:$PWD/node_modules/.bin:$HOME/.cargo/bin:$PATH
if [[ -n "$DEVENV_NIX" ]]
then
# Does not work from direnv
# https://github.com/direnv/direnv/issues/773#issuecomment-792688396
source $PWD/src/share/bash-completion/completions/rsdk
rsdk welcome
else
rsdk welcome 'Please run `rsdk shell` to enter the full development shell.
'
fi
'';
languages.javascript = {
enable = true;
npm.enable = true;
};
languages.jsonnet.enable = true;
pre-commit = {
hooks = {
commitizen.enable = true;
shellcheck = {
enable = true;
entry = lib.mkForce "${pkgs.shellcheck}/bin/shellcheck -x";
};
shfmt.enable = true;
statix.enable = true;
typos = {
enable = true;
excludes = [
"theme/highlight.js"
];
};
};
};
starship.enable = true;
}