-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
81 lines (68 loc) · 2.16 KB
/
Copy pathshell.nix
File metadata and controls
81 lines (68 loc) · 2.16 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
# BitNode Console development shell
#
# This Nix shell defines a reproducible development environment for the
# repository. It provides the required toolchains (Rust, docs, frontend),
# build dependencies, and default environment variables used during local
# development and by VS Code extensions.
#
# Learn more about Nix development shells:
# - https://nix.dev/tutorials/first-steps/declarative-and-reproducible-developer-environments
# - https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-mkShell
{ pkgs ? import <nixpkgs> {} }:
let
# Unified Python environment for MkDocs and all required plugins/extensions.
# Bundling them with withPackages ensures they share one interpreter and
# avoids PYTHONPATH conflicts between individually-installed packages.
mkdocsPython = pkgs.python3.withPackages (ps: with ps; [
mkdocs
mkdocs-material
pymdown-extensions
]);
in
# Define the interactive development shell environment.
pkgs.mkShell {
# Tooling available in the shell PATH.
packages = with pkgs; [
# Rust toolchain
cargo
rustc
rust-analyzer
taplo
# Docs and task runner
mdbook
cargo-make
mkdocsPython # mkdocs + material + pymdown-extensions
# Code Linting and Coverage
cargo-tarpaulin
clippy
rustfmt
cargo-audit
# Frontend tooling
nodejs_22
pnpm
# Build dependencies
pkg-config
openssl
protobuf # protoc compiler required by tonic-build/prost-build
buf # protobuf linter and breaking-change detector
# direnv Nix shell caching (needed for VS Code extension host)
nix-direnv
# Development tools
grpcurl
# Bitcoin daemon + journal integration for local dev
bitcoin-knots
systemd
# Password hashing
libargon2
];
# Environment defaults applied whenever entering the shell.
# These variables improve diagnostics/logging and let rust-analyzer resolve
# the standard library source via RUST_SRC_PATH.
shellHook = ''
export BITNODE_ENV="development"
export CARGO_TERM_COLOR="always"
export RUST_BACKTRACE="1"
export RUST_SRC_PATH="${pkgs.rustPlatform.rustLibSrc}"
export PROTOC="${pkgs.protobuf}/bin/protoc"
'';
}