aboutsummaryrefslogtreecommitdiff
path: root/back/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'back/default.nix')
-rw-r--r--back/default.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/back/default.nix b/back/default.nix
index f74936a..99ff78f 100644
--- a/back/default.nix
+++ b/back/default.nix
@@ -1,4 +1,4 @@
-workadventuresrc:
+workadventuresrc: waname:
{ stdenv
, autoPatchelfHook
@@ -34,8 +34,9 @@ let
in
yarn2nix-moretea.mkYarnPackage rec {
- pname = "workadventureback";
+ pname = "workadventureback-${waname}";
version = "unstable";
+ name = pname + "-" + version;
src = "${workadventuresrc}/back";
@@ -56,18 +57,18 @@ 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/workadventureback/src/Messages/generated
HOME=$TMPDIR yarn --offline run tsc
- cp -r deps/${pname}/dist $out/dist
- rm -rf deps/${pname}/{src,node_modules}
+ 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/${pname}/node_modules \
+ makeWrapper '${nodejs-14_x}/bin/node' "$out/bin/workadventureback" \
+ --set NODE_PATH $out/libexec/workadventureback/node_modules \
--prefix PATH : ${lib.makeBinPath [ getconf ]} \
--add-flags "$out/dist/server.js"
'';