about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/em-modules
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/em-modules
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/em-modules')
-rw-r--r--nixpkgs/pkgs/development/em-modules/generic/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/em-modules/generic/default.nix b/nixpkgs/pkgs/development/em-modules/generic/default.nix
index 8bfbf6ec3099..2f8d7d878a8e 100644
--- a/nixpkgs/pkgs/development/em-modules/generic/default.nix
+++ b/nixpkgs/pkgs/development/em-modules/generic/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, lib, emscripten, python2 }:
+{ pkgs, lib, emscripten, python3 }:
 
 { buildInputs ? [], nativeBuildInputs ? []
 
@@ -12,12 +12,15 @@ 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;
 
+  # removes archive indices
+  dontStrip = args.dontStrip or true;
+
   configurePhase = args.configurePhase or ''
     # FIXME: Some tests require writing at $HOME
     HOME=$TMPDIR
@@ -25,6 +28,9 @@ pkgs.stdenv.mkDerivation (
 
     emconfigure ./configure --prefix=$out
 
+    mkdir -p .emscriptencache
+    export EM_CACHE=$(pwd)/.emscriptencache
+
     runHook postConfigure
   '';
 
@@ -32,6 +38,7 @@ pkgs.stdenv.mkDerivation (
     runHook preBuild
 
     HOME=$TMPDIR
+
     emmake make
 
     runHook postBuild