only use nodejs 18 openssl workaround for 18+
This commit is contained in:
parent
729343a933
commit
262f1c6aba
2 changed files with 4 additions and 2 deletions
|
@ -25,6 +25,7 @@
|
||||||
};
|
};
|
||||||
patches = [./admin-fe.patch];
|
patches = [./admin-fe.patch];
|
||||||
};
|
};
|
||||||
|
nodeOptions = if builtins.compareVersions nodejs.version "18" >= 0 then "--openssl-legacy-provider" else "";
|
||||||
in
|
in
|
||||||
mkYarnPackage rec {
|
mkYarnPackage rec {
|
||||||
pname = "admin-fe";
|
pname = "admin-fe";
|
||||||
|
@ -44,7 +45,7 @@ in
|
||||||
|
|
||||||
configurePhase = "cp -r $node_modules node_modules";
|
configurePhase = "cp -r $node_modules node_modules";
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export NODE_OPTIONS="--openssl-legacy-provider"
|
export NODE_OPTIONS="${nodeOptions}"
|
||||||
yarn build:prod --offline
|
yarn build:prod --offline
|
||||||
'';
|
'';
|
||||||
installPhase = "cp -rv dist $out";
|
installPhase = "cp -rv dist $out";
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
};
|
};
|
||||||
patches = [./pleroma-fe.patch];
|
patches = [./pleroma-fe.patch];
|
||||||
};
|
};
|
||||||
|
nodeOptions = if builtins.compareVersions nodejs.version "18" >= 0 then "--openssl-legacy-provider" else "";
|
||||||
in
|
in
|
||||||
mkYarnPackage rec {
|
mkYarnPackage rec {
|
||||||
pname = "pleroma-fe";
|
pname = "pleroma-fe";
|
||||||
|
@ -44,7 +45,7 @@ in
|
||||||
'';
|
'';
|
||||||
configurePhase = "cp -r $node_modules node_modules";
|
configurePhase = "cp -r $node_modules node_modules";
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export NODE_OPTIONS="--openssl-legacy-provider"
|
export NODE_OPTIONS="${nodeOptions}"
|
||||||
yarn build --offline
|
yarn build --offline
|
||||||
'';
|
'';
|
||||||
installPhase = "cp -rv dist $out";
|
installPhase = "cp -rv dist $out";
|
||||||
|
|
Reference in a new issue