Fixed emscripten breaks on NixOS due to lack of FHS

This commit is contained in:
Emile Clark-Boman 2025-07-22 03:44:20 +10:00
parent 65234ec820
commit 8aaa3b7c12

View file

@ -16,6 +16,15 @@
};
in
pkgs.mkShell {
# Ref: https://github.com/NixOS/nixpkgs/issues/139943
# EM_CONFIG = pkgs.writeText ".emscripten" ''
# EMSCRIPTEN_ROOT = '${pkgs.emscripten}/share/emscripten'
# LLVM_ROOT = '${pkgs.emscripten.llvmEnv}/bin'
# BINARYEN_ROOT = '${pkgs.binaryen}'
# NODE_JS = '${pkgs.nodejs_24}/bin/node'
# CACHE = '${toString ./.cache}'
# '';
packages = with pkgs; [
openssl
gnumake
@ -25,6 +34,10 @@
shell = "${pkgs.bash}/bin/bash";
shellHook = ''
export EM_CACHE=$PWD/.emscripten_cache
cp -r ${pkgs.emscripten}/share/emscripten/cache $EM_CACHE
chmod u+rwX -R $EM_CACHE
function makejs { make -f Makefile.js $@; }
'';
};