aboutsummaryrefslogtreecommitdiff
path: root/front
diff options
context:
space:
mode:
authorBłażej Święcicki2021-01-14 23:54:35 +0000
committerBłażej Święcicki2021-01-14 23:54:35 +0000
commit51d69620e1543f8cf4ae093c4c0b15e228c58d14 (patch)
treeeae1d2d523980b475dbc8f08b6cff6369d7ecdc6 /front
parent8321fdf6e8235198613434713d80b7028960902d (diff)
parenta76cd83752bebff7a271534b49ce15cb16145051 (diff)
Merge branch 'mewp/configurable-frontend' into 'master'
Make the front package configurable. See merge request fediventure/workadventure-nix!1
Diffstat (limited to '')
-rw-r--r--front/default.nix38
-rw-r--r--front/yarn.nix16
2 files changed, 39 insertions, 15 deletions
diff --git a/front/default.nix b/front/default.nix
index 057855e..43eb919 100644
--- a/front/default.nix
+++ b/front/default.nix
@@ -1,19 +1,43 @@
{ stdenv
-, fetchFromGitHub
+, fetchFromGitLab
, makeWrapper
, workadventure-messages
, yarn2nix-moretea
+, lib
+, environment ? {}
, ... }:
-yarn2nix-moretea.mkYarnPackage rec {
+
+let
+ envVar = (name: lib.optionalAttrs (environment ? ${name}) { ${name} = environment.${name}; });
+
+ envVars = envVar "DEBUG_MODE"
+ // envVar "API_URL"
+ // envVar "UPLOADER_URL"
+ // envVar "ADMIN_URL"
+ // envVar "MAPS_URL"
+ // envVar "API_HOST"
+ // envVar "UPLOADER_HOST"
+ // envVar "ADMIN_HOST"
+ // envVar "MAPS_HOST"
+ // envVar "API_PROTOCOL"
+ // envVar "UPLOADER_PROTOCOL"
+ // envVar "ADMIN_PROTOCOL"
+ // envVar "MAPS_PROTOCOL"
+ // envVar "TURN_SERVER"
+ // envVar "TURN_USER"
+ // envVar "TURN_PASSWORD"
+ // envVar "JITSI_URL"
+ // envVar "JITSI_PRIVATE_MODE";
+in yarn2nix-moretea.mkYarnPackage (rec {
pname = "workadventurefront";
version = "unstable";
- src = fetchFromGitHub
+ src = fetchFromGitLab
{
- owner = "thecodingmachine";
+ owner = "fediventure";
repo = "workadventure";
- rev = "284846e8a59ec0d921189ac3a46e0eb5d1e14818";
- sha256 = "1f1vi226kas7x9y8zw810q5vg1ikn4bb6ha9vnzvqk9y7jlc1n8q";
+ rev = "1bcf0757fd5203132edd17fc806d81e7699111a7";
+ sha256 = "0wwgfrcrpimpxjhk073yxlkcp1p0bn0glxd9wisyq5kv8s7jw1yz";
} + "/front";
# NOTE: this is optional and generated dynamically if omitted
@@ -32,4 +56,4 @@ yarn2nix-moretea.mkYarnPackage rec {
distPhase = ":";
installPhase = ":";
-}
+} // envVars)
diff --git a/front/yarn.nix b/front/yarn.nix
index 02533a2..f094242 100644
--- a/front/yarn.nix
+++ b/front/yarn.nix
@@ -674,11 +674,11 @@
};
}
{
- name = "axios___axios_0.20.0.tgz";
+ name = "axios___axios_0.21.1.tgz";
path = fetchurl {
- name = "axios___axios_0.20.0.tgz";
- url = "https://registry.yarnpkg.com/axios/-/axios-0.20.0.tgz";
- sha1 = "057ba30f04884694993a8cd07fa394cff11c50bd";
+ name = "axios___axios_0.21.1.tgz";
+ url = "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz";
+ sha1 = "22563481962f4d6bde9a76d516ef0e5d3c09b2b8";
};
}
{
@@ -4090,11 +4090,11 @@
};
}
{
- name = "phaser___phaser_3.24.1.tgz";
+ name = "phaser___phaser_3.51.0.tgz";
path = fetchurl {
- name = "phaser___phaser_3.24.1.tgz";
- url = "https://registry.yarnpkg.com/phaser/-/phaser-3.24.1.tgz";
- sha1 = "376e0c965d2a35af37c06ee78627dafbde5be017";
+ name = "phaser___phaser_3.51.0.tgz";
+ url = "https://registry.yarnpkg.com/phaser/-/phaser-3.51.0.tgz";
+ sha1 = "b0c7ee2b21e795830d74f476dd30816a42b023bd";
};
}
{