From 262f1c6abac961218c381325fdc6564349a8f045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 9 Oct 2022 17:06:01 +0100 Subject: [PATCH] only use nodejs 18 openssl workaround for 18+ --- akkoma/admin-fe/default.nix | 3 ++- akkoma/pleroma-fe/default.nix | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/akkoma/admin-fe/default.nix b/akkoma/admin-fe/default.nix index 7da2a12..c6cb6a5 100644 --- a/akkoma/admin-fe/default.nix +++ b/akkoma/admin-fe/default.nix @@ -25,6 +25,7 @@ }; patches = [./admin-fe.patch]; }; + nodeOptions = if builtins.compareVersions nodejs.version "18" >= 0 then "--openssl-legacy-provider" else ""; in mkYarnPackage rec { pname = "admin-fe"; @@ -44,7 +45,7 @@ in configurePhase = "cp -r $node_modules node_modules"; buildPhase = '' - export NODE_OPTIONS="--openssl-legacy-provider" + export NODE_OPTIONS="${nodeOptions}" yarn build:prod --offline ''; installPhase = "cp -rv dist $out"; diff --git a/akkoma/pleroma-fe/default.nix b/akkoma/pleroma-fe/default.nix index 554a76c..9fffe06 100644 --- a/akkoma/pleroma-fe/default.nix +++ b/akkoma/pleroma-fe/default.nix @@ -22,6 +22,7 @@ }; patches = [./pleroma-fe.patch]; }; + nodeOptions = if builtins.compareVersions nodejs.version "18" >= 0 then "--openssl-legacy-provider" else ""; in mkYarnPackage rec { pname = "pleroma-fe"; @@ -44,7 +45,7 @@ in ''; configurePhase = "cp -r $node_modules node_modules"; buildPhase = '' - export NODE_OPTIONS="--openssl-legacy-provider" + export NODE_OPTIONS="${nodeOptions}" yarn build --offline ''; installPhase = "cp -rv dist $out";