aboutsummaryrefslogtreecommitdiff
path: root/pusher/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pusher/default.nix')
-rw-r--r--pusher/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pusher/default.nix b/pusher/default.nix
index bdace68..1c41765 100644
--- a/pusher/default.nix
+++ b/pusher/default.nix
@@ -1,6 +1,8 @@
{ stdenv
, autoPatchelfHook
, makeWrapper
+, lib
+, getconf
, fetchzip
, fetchFromGitHub
@@ -60,17 +62,23 @@ yarn2nix-moretea.mkYarnPackage rec {
dontStrip = true;
+ # workadventureback below is a package name extracted from package.json,
+ # intended until upstream fixes that up.
buildPhase = ''
mkdir -p $out
ln -s ${workadventure.messages.outPath}/generated deps/workadventureback/src/Messages/generated
HOME=$TMPDIR yarn --offline run tsc
cp -r deps/workadventureback/dist $out/dist
+ rm -rf deps/workadventureback/{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/workadventureback/node_modules \
+ --prefix PATH : ${lib.makeBinPath [ getconf ]} \
--add-flags "$out/dist/server.js"
'';
}