Fixed emscripten breaks on NixOS due to lack of FHS
This commit is contained in:
parent
65234ec820
commit
8aaa3b7c12
1 changed files with 13 additions and 0 deletions
13
flake.nix
13
flake.nix
|
|
@ -16,6 +16,15 @@
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
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; [
|
packages = with pkgs; [
|
||||||
openssl
|
openssl
|
||||||
gnumake
|
gnumake
|
||||||
|
|
@ -25,6 +34,10 @@
|
||||||
shell = "${pkgs.bash}/bin/bash";
|
shell = "${pkgs.bash}/bin/bash";
|
||||||
|
|
||||||
shellHook = ''
|
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 $@; }
|
function makejs { make -f Makefile.js $@; }
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue