aboutsummaryrefslogtreecommitdiff
path: root/back
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--back/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/back/default.nix b/back/default.nix
index 5a5a973..a7e0858 100644
--- a/back/default.nix
+++ b/back/default.nix
@@ -4,8 +4,10 @@
, fetchzip
, makeWrapper
, nodejs-14_x
-, workadventure-messages
+, workadventure
, yarn2nix-moretea
+, lib
+, getconf
, ... }:
let
@@ -59,15 +61,19 @@ yarn2nix-moretea.mkYarnPackage rec {
buildPhase = ''
mkdir -p $out
- ln -s ${workadventure-messages.outPath}/generated deps/${pname}/src/Messages/generated
+ ln -s ${workadventure.messages.outPath}/generated deps/${pname}/src/Messages/generated
HOME=$TMPDIR yarn --offline run tsc
cp -r deps/${pname}/dist $out/dist
+ rm -rf deps/${pname}/{src,node_modules}
'';
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"
'';
}