aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--back/default.nix5
-rw-r--r--pusher/default.nix5
2 files changed, 10 insertions, 0 deletions
diff --git a/back/default.nix b/back/default.nix
index 06325c7..a7e0858 100644
--- a/back/default.nix
+++ b/back/default.nix
@@ -6,6 +6,8 @@
, nodejs-14_x
, workadventure
, yarn2nix-moretea
+, lib
+, getconf
, ... }:
let
@@ -67,8 +69,11 @@ yarn2nix-moretea.mkYarnPackage rec {
postInstall = ''
# node-abi needs to the abi of the node here
+ # getconf is required for detect-libc (used by node-pre-gyp) to properly
+ # detect current libc
makeWrapper '${nodejs-14_x}/bin/node' "$out/bin/${pname}" \
--set NODE_PATH $out/libexec/${pname}/node_modules \
+ --prefix PATH : ${lib.makeBinPath [ getconf ]} \
--add-flags "$out/dist/server.js"
'';
}
diff --git a/pusher/default.nix b/pusher/default.nix
index 44c4c68..1c41765 100644
--- a/pusher/default.nix
+++ b/pusher/default.nix
@@ -1,6 +1,8 @@
{ stdenv
, autoPatchelfHook
, makeWrapper
+, lib
+, getconf
, fetchzip
, fetchFromGitHub
@@ -72,8 +74,11 @@ yarn2nix-moretea.mkYarnPackage rec {
postInstall = ''
# node-abi needs to the abi of the node here
+ # getconf is required for detect-libc (used by node-pre-gyp) to properly
+ # detect current libc
makeWrapper '${nodejs-14_x}/bin/node' "$out/bin/${pname}" \
--set NODE_PATH $out/libexec/workadventureback/node_modules \
+ --prefix PATH : ${lib.makeBinPath [ getconf ]} \
--add-flags "$out/dist/server.js"
'';
}