-
Notifications
You must be signed in to change notification settings - Fork 244
/
shell.nix
51 lines (47 loc) · 909 Bytes
/
shell.nix
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
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
packages = with pkgs; [
binaryen
cargo-insta
cargo-nextest
cargo-watch
git
graphviz
jq
llvmPackages_latest.bintools
nodejs_22
pnpm_9
rustup
wabt
wasm-bindgen-cli
wasm-pack
];
nativeBuildInputs =
with pkgs;
[
pkg-config
]
++ lib.optionals stdenv.isDarwin [
perl
];
buildInputs =
with pkgs;
[
openssl.dev
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
iconv
];
shellHook =
let
useLld = "-C link-arg=-fuse-ld=lld";
in
pkgs.lib.optionalString pkgs.stdenv.isLinux ''
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="${useLld}"
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS="${useLld}"
'';
}