emscriptenStdenv: fix cache location

This commit is contained in:
Will Cohen 2022-05-09 10:56:23 -04:00
parent 15c43ea9ee
commit b5f228c836

View file

@ -1,4 +1,4 @@
{ pkgs, lib, emscripten, python2 }:
{ pkgs, lib, emscripten, python3 }:
{ buildInputs ? [], nativeBuildInputs ? []
@ -12,8 +12,8 @@ pkgs.stdenv.mkDerivation (
pname = "emscripten-${lib.getName args}";
version = lib.getVersion args;
buildInputs = [ emscripten python2 ] ++ buildInputs;
nativeBuildInputs = [ emscripten python2 ] ++ nativeBuildInputs;
buildInputs = [ emscripten python3 ] ++ buildInputs;
nativeBuildInputs = [ emscripten python3 ] ++ nativeBuildInputs;
# fake conftest results with emscripten's python magic
EMCONFIGURE_JS=2;
@ -25,6 +25,9 @@ pkgs.stdenv.mkDerivation (
emconfigure ./configure --prefix=$out
mkdir -p .emscriptencache
export EM_CACHE=$(pwd)/.emscriptencache
runHook postConfigure
'';
@ -32,6 +35,7 @@ pkgs.stdenv.mkDerivation (
runHook preBuild
HOME=$TMPDIR
emmake make
runHook postBuild