-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
28 lines (24 loc) · 989 Bytes
/
flake.nix
File metadata and controls
28 lines (24 loc) · 989 Bytes
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {nixpkgs, ...}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
dioxus-cli
wasm-bindgen-cli_0_2_100
];
# https://docs.rs/getrandom/0.3.3/getrandom/#webassembly-support
RUSTFLAGS = "--cfg getrandom_backend=\"wasm_js\"";
# With gcc (default), the WASM build fails silently
# at runtime there is an error message similar to https://github.com/DioxusLabs/dioxus/discussions/3807.
# this seems to be caused by the ring dependency: https://github.com/briansmith/ring/issues/1473
CC_wasm32_unknown_unknown = "${pkgs.llvmPackages.clang-unwrapped}/bin/clang";
# Include path to standard library is missing by default.
CFLAGS_wasm32_unknown_unknown = "-I${pkgs.llvmPackages.clang}/resource-root/include/";
};
};
}