summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-11-17 11:31:12 -0500
committerFreya Murphy <freya@freyacat.org>2025-11-17 11:31:12 -0500
commit988bb3d9048c65e2c54d8b7e46a0e2d69e8aea13 (patch)
tree0a8cdcd1b1a45a5dd58d6229d4bbb432e07d1a0e /flake.nix
parentwasm support! (diff)
downloadDungeonCrawl-988bb3d9048c65e2c54d8b7e46a0e2d69e8aea13.tar.gz
DungeonCrawl-988bb3d9048c65e2c54d8b7e46a0e2d69e8aea13.tar.bz2
DungeonCrawl-988bb3d9048c65e2c54d8b7e46a0e2d69e8aea13.zip
get wasm building with just nixpkgs, remove docker
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index fc49406..10f9fea 100644
--- a/flake.nix
+++ b/flake.nix
@@ -41,14 +41,11 @@
packages = with pkgs;
[
# rust
- rustc
- rustfmt
- rust-analyzer
- cargo
- cargo-flamegraph
- clippy
+ rustup
# web
+ emscripten
python3
+ nodejs
# raylib
cmake
clang
@@ -64,10 +61,19 @@
else
export SDL_VIDEODRIVER=x11
fi
+
+ # setup wasm
+ export PATH="$EMSDK/share/emscripten:$PATH"
+ export C_INCLUDE_PATH="$EMSDK_SYSROOT/include:$C_INCLUDE_PATH"
+ export EM_CACHE="$HOME"/.emscripten_cache
'';
LD_LIBRARY_PATH = lib.makeLibraryPath libs;
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
+
+ EMSDK = "${pkgs.emscripten}";
+ EMSDK_NODE = "${pkgs.nodejs}/bin/node";
+ EMSDK_SYSROOT = "${pkgs.emscripten}/share/emscripten/cache/sysroot";
};
formatter = pkgs.alejandra;