-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
61 lines (53 loc) · 1.12 KB
/
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
52
53
54
55
56
57
58
59
60
61
{
pkgs ? import <nixpkgs> {},
fenix,
}: let
getLibFolder = pkg: "${pkg}/lib";
toolchain = fenix.packages.${pkgs.system}.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-s1RPtyvDGJaX/BisLT+ifVfuhDT1nZkZ1NcK8sbwELM=";
};
in
pkgs.stdenv.mkDerivation {
name = "rust-website";
nativeBuildInputs = with pkgs; [
# LLVM & GCC
gcc
cmake
gnumake
pkg-config
llvmPackages.llvm
llvmPackages.clang
llvmPackages.bintools
# Hail the Nix
nixd
statix
alejandra
# Launch scripts
just
# Tailwind
tailwindcss
# Rust
rustc
cargo
clippy
trunk
toolchain
wasm-pack
cargo-watch
rust-analyzer
wasm-bindgen-cli
];
buildInputs = with pkgs; [
openssl
];
# Set Environment Variables
RUST_BACKTRACE = 1;
NIX_LDFLAGS = "-L${(getLibFolder pkgs.libiconv)}";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.gcc
pkgs.libiconv
pkgs.llvmPackages.llvm
];
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld";
}