-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
53 lines (44 loc) · 1.69 KB
/
shell.nix
File metadata and controls
53 lines (44 loc) · 1.69 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
{ pkgs ? import <nixpkgs> {
overlays = [
(import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
];
}
}:
pkgs.mkShell {
name = "wrtctrl";
nativeBuildInputs = with pkgs; [
(rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rust-analyzer" ];
targets = [ "wasm32-unknown-unknown" "x86_64-unknown-linux-musl" ];
})
zig
cargo-zigbuild
ripgrep
cargo-make
cargo-leptos
tailwindcss_4
pkg-config
openssl
lld
wasm-bindgen-cli
binaryen # wasm-opt (used by cargo-leptos in release mode)
sass # optional: if you add .scss files later
ripgrep
];
buildInputs = with pkgs; [ openssl ];
OPENSSL_NO_VENDOR = "1";
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld";
shellHook = ''
echo "✓ cargo-leptos $(cargo-leptos --version 2>/dev/null | head -1)"
echo ""
echo "╔══════════════════════════════════════════╗"
echo "║ wrtctrl dev shell ║"
echo "╠══════════════════════════════════════════╣"
echo "║ cargo make dev -> hot-reload server ║"
echo "║ cargo make build -> release build ║"
echo "║ cargo make test -> run tests ║"
echo "║ cargo make check -> fmt & clippy ║"
echo "╚══════════════════════════════════════════╝"
'';
}