blob: ea49c0f0d4890964e59e0a0358b13514ca690062 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
{ stdenv
, fetchFromGitHub
, makeWrapper
, workadventure-messages
, yarn2nix-moretea
, lib
, ... } @ args:
yarn2nix-moretea.mkYarnPackage rec {
pname = "workadventurefront";
version = "unstable";
src = fetchFromGitHub
{
owner = "thecodingmachine";
repo = "workadventure";
rev = "284846e8a59ec0d921189ac3a46e0eb5d1e14818";
sha256 = "1f1vi226kas7x9y8zw810q5vg1ikn4bb6ha9vnzvqk9y7jlc1n8q";
} + "/front";
# NOTE: this is optional and generated dynamically if omitted
yarnNix = ./yarn.nix;
nativeBuildInputs = [ makeWrapper ];
dontStrip = true;
buildPhase = ''
mkdir -p $out
ln -s ${workadventure-messages.outPath}/generated deps/${pname}/src/Messages/generated
HOME=$TMPDIR yarn --offline run build
cp -r deps/${pname}/dist/ $out/
'';
distPhase = ":";
installPhase = ":";
} // lib.getAttrs [
"DEBUG_MODE" "API_URL" "UPLOADER_URL" "ADMIN_URL"
"API_PROTOCOL" "UPLOADER_PROTOCOL" "ADMIN_PROTOCOL"
"TURN_SERVER" "TURN_USER" "TURN_PASSWORD"
"JITSI_URL" "JITSI_PRIVATE_MODE" ] args
|