only use nodejs 18 openssl workaround for 18+

This commit is contained in:
Charlotte 🦝 Delenk 2022-10-09 17:06:01 +01:00
parent 729343a933
commit 262f1c6aba
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
2 changed files with 4 additions and 2 deletions

View file

@ -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";

View file

@ -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";