Repository navigation
Expand file tree
/
Copy pathdevenv.nix
More file actions
87 lines (76 loc) · 2.41 KB
/
Copy pathdevenv.nix
File metadata and controls
87 lines (76 loc) · 2.41 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
76
77
78
79
80
81
82
83
84
85
86
87
{ pkgs, lib, ... }:
{
languages.rust = {
enable = true;
toolchainFile = ./rust-toolchain.toml;
};
packages = [
# Rust workflow
pkgs.cargo-nextest
pkgs.cargo-insta
pkgs.cargo-deny
pkgs.cargo-llvm-cov
# Optional compile cache: `export RUSTC_WRAPPER=sccache`. It shares the
# C and C++ parts (Luau, tree-sitter grammars, wasmtime) between
# checkouts; Rust crates hit only when built at the same target path.
pkgs.sccache
# `script`, which the terminal tests run greed under
pkgs.util-linux
pkgs.bacon
# CHANGELOG.md from the commits (cliff.toml)
pkgs.git-cliff
# A real IMAP server for greed-mail's tests (crates/greed-mail/tests)
pkgs.dovecot
# Luau: runtime/analyzer, language server, formatter
pkgs.luau
pkgs.luau-lsp
pkgs.stylua
# Spelling and grammar for prose, through the lsp plugin
pkgs.harper
pkgs.tree-sitter
# wasmtime, which loads downloaded grammars, builds its C API with it
pkgs.cmake
# The website: site/build.sh and site/serve.sh
pkgs.mdbook
pkgs.miniserve
# Its videos: site/media/record.sh
pkgs.ffmpeg-headless
# An agent to try Greed's agent support with, beside Claude Code
pkgs.opencode
# The data plugin's sqlite source runs it, and its tests do
pkgs.sqlite
]
# Servers the chat programs' tests run against, which skip without them;
# they don't build on macOS.
++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
# A Matrix homeserver for greed-matrix's tests (crates/greed-matrix/tests)
pkgs.matrix-tuwunel
# Mattermost and the PostgreSQL it needs, for greed-mattermost's tests
pkgs.mattermostLatest
pkgs.postgresql
];
# What the window client (`greed --gui`) loads at run time: the display
# server's libraries and the GPU driver's loader. macOS has them built in.
env = lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
LD_LIBRARY_PATH = lib.makeLibraryPath [
pkgs.libGL
pkgs.libxkbcommon
pkgs.vulkan-loader
pkgs.wayland
pkgs.xorg.libX11
pkgs.xorg.libXcursor
pkgs.xorg.libXi
pkgs.xorg.libXrandr
];
};
git-hooks.hooks = {
rustfmt.enable = true;
clippy = {
enable = true;
settings.denyWarnings = true;
};
stylua.enable = true;
};
# Run the hooks on commit, not every time the shell starts.
tasks."devenv:git-hooks:run".before = lib.mkForce [ ];
}