diff options
Diffstat (limited to 'front')
-rw-r--r-- | front/default.nix | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/front/default.nix b/front/default.nix index ea49c0f..ecb5afb 100644 --- a/front/default.nix +++ b/front/default.nix @@ -4,8 +4,25 @@ , workadventure-messages , yarn2nix-moretea , lib -, ... } @ args: -yarn2nix-moretea.mkYarnPackage rec { +, environment ? {} +, ... }: + +let + envVar = (name: lib.optionalAttrs (environment ? name) { name = environment.${name}; }); + + envVars = envVar "DEBUG_MODE" + // envVar "API_URL" + // envVar "UPLOADER_URL" + // envVar "ADMIN_URL" + // envVar "API_PROTOCOL" + // envVar "UPLOADER_PROTOCOL" + // envVar "ADMIN_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"; @@ -33,8 +50,4 @@ yarn2nix-moretea.mkYarnPackage rec { 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 +} // envVars) |