@@ -15,8 +15,7 @@
|
|||||||
icu,
|
icu,
|
||||||
jdk,
|
jdk,
|
||||||
lib,
|
lib,
|
||||||
nodejs_22,
|
nodejs-slim,
|
||||||
nodejs-slim_22,
|
|
||||||
openssl,
|
openssl,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
python3,
|
python3,
|
||||||
@@ -224,9 +223,6 @@ let
|
|||||||
web-apps = buildNpmPackage (finalAttrs: {
|
web-apps = buildNpmPackage (finalAttrs: {
|
||||||
name = "onlyoffice-core-web-apps";
|
name = "onlyoffice-core-web-apps";
|
||||||
|
|
||||||
# workaround for https://github.com/NixOS/nixpkgs/issues/477803
|
|
||||||
nodejs = nodejs_22;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ONLYOFFICE";
|
owner = "ONLYOFFICE";
|
||||||
repo = "web-apps";
|
repo = "web-apps";
|
||||||
@@ -732,8 +728,6 @@ let
|
|||||||
qmakeFlags
|
qmakeFlags
|
||||||
++ icuQmakeFlags
|
++ icuQmakeFlags
|
||||||
++ [
|
++ [
|
||||||
# c++1z for nodejs-slim_22.libv8 (20 seems to produce errors around 'is_void_v' there)
|
|
||||||
# c++ 20 for nodejs_23.libv8
|
|
||||||
"CONFIG+=c++2a"
|
"CONFIG+=c++2a"
|
||||||
# v8_base.h will set nMaxVirtualMemory to 4000000000/5000000000
|
# v8_base.h will set nMaxVirtualMemory to 4000000000/5000000000
|
||||||
# which is not page-aligned, so disable memory limitation for now
|
# which is not page-aligned, so disable memory limitation for now
|
||||||
@@ -744,6 +738,13 @@ let
|
|||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cd $BUILDRT
|
cd $BUILDRT
|
||||||
|
|
||||||
|
# We need to build statically to be able to piggy-back
|
||||||
|
# on nodejs's v8
|
||||||
|
substituteInPlace \
|
||||||
|
DesktopEditor/doctrenderer/doctrenderer.pri \
|
||||||
|
--replace-fail "CONFIG += shared" "CONFIG += staticlib" \
|
||||||
|
--replace-fail "CONFIG += plugin" ""
|
||||||
|
|
||||||
substituteInPlace \
|
substituteInPlace \
|
||||||
DesktopEditor/doctrenderer/nativecontrol.h \
|
DesktopEditor/doctrenderer/nativecontrol.h \
|
||||||
--replace-fail "fprintf(f, strVal.c_str());" "fprintf(f, \"%s\", strVal.c_str());" \
|
--replace-fail "fprintf(f, strVal.c_str());" "fprintf(f, \"%s\", strVal.c_str());" \
|
||||||
@@ -761,16 +762,26 @@ let
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "== v8 =="
|
echo "== v8 =="
|
||||||
|
substituteInPlace \
|
||||||
|
DesktopEditor/doctrenderer/js_internal/v8/v8_base.h \
|
||||||
|
--replace-fail "args.Holder" "args.This"
|
||||||
|
substituteInPlace \
|
||||||
|
DesktopEditor/doctrenderer/js_internal/v8/v8_base.cpp \
|
||||||
|
--replace-fail "args.Holder" "args.This"
|
||||||
|
|
||||||
mkdir -p Common/3dParty/v8_89/v8/out.gn/linux_64
|
mkdir -p Common/3dParty/v8_89/v8/out.gn/linux_64
|
||||||
# using nodejs_22 here is a workaround for https://github.com/NixOS/nixpkgs/issues/477805
|
ln -s ${nodejs-slim.libv8}/lib Common/3dParty/v8_89/v8/out.gn/linux_64/obj
|
||||||
ln -s ${nodejs-slim_22.libv8}/lib Common/3dParty/v8_89/v8/out.gn/linux_64/obj
|
tar xf ${nodejs-slim.libv8.src} --one-top-level=/tmp/xxxxx
|
||||||
tar xf ${nodejs-slim_22.libv8.src} --one-top-level=/tmp/xxxxx
|
|
||||||
for i in /tmp/xxxxx/*/deps/v8/*; do
|
for i in /tmp/xxxxx/*/deps/v8/*; do
|
||||||
cp -r $i Common/3dParty/v8_89/v8/
|
cp -r $i Common/3dParty/v8_89/v8/
|
||||||
done
|
done
|
||||||
|
|
||||||
cd $BUILDRT/DesktopEditor/doctrenderer
|
cd $BUILDRT/DesktopEditor/doctrenderer
|
||||||
'';
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib
|
||||||
|
cp ../../build/lib/*/*.a $out/lib
|
||||||
|
'';
|
||||||
passthru.tests = lib.attrsets.genAttrs [ "embed/external" "embed/internal" "js_internal" "json" ] (
|
passthru.tests = lib.attrsets.genAttrs [ "embed/external" "embed/internal" "js_internal" "json" ] (
|
||||||
test:
|
test:
|
||||||
buildCoreTests "DesktopEditor/doctrenderer/test/${test}" {
|
buildCoreTests "DesktopEditor/doctrenderer/test/${test}" {
|
||||||
@@ -885,9 +896,24 @@ let
|
|||||||
xpsfile
|
xpsfile
|
||||||
djvufile
|
djvufile
|
||||||
];
|
];
|
||||||
qmakeFlags = qmakeFlags ++ icuQmakeFlags;
|
qmakeFlags =
|
||||||
|
qmakeFlags
|
||||||
|
++ icuQmakeFlags
|
||||||
|
++ [
|
||||||
|
"QMAKE_LFLAGS+=-licui18n"
|
||||||
|
];
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
source ${fixIcu}
|
source ${fixIcu}
|
||||||
|
|
||||||
|
# We need to build statically to be able to piggy-back
|
||||||
|
# on nodejs's v8
|
||||||
|
substituteInPlace \
|
||||||
|
$BUILDRT/DesktopEditor/doctrenderer/doctrenderer.pri \
|
||||||
|
--replace-fail "CONFIG += shared" "CONFIG += staticlib" \
|
||||||
|
--replace-fail "CONFIG += plugin" ""
|
||||||
|
|
||||||
|
echo "LIBS += -L${openssl'.out}/lib -lcrypto" >> $BUILDRT/DesktopEditor/allthemesgen/allthemesgen.pro
|
||||||
|
echo "LIBS += -L${nodejs-slim.libv8}/lib -lv8 -pthread" >> $BUILDRT/DesktopEditor/allthemesgen/allthemesgen.pro
|
||||||
'';
|
'';
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@@ -956,10 +982,26 @@ buildCoreComponent "X2tConverter/build/Qt" {
|
|||||||
starmath
|
starmath
|
||||||
ooxmlsignature
|
ooxmlsignature
|
||||||
];
|
];
|
||||||
qmakeFlags = qmakeFlags ++ icuQmakeFlags ++ [ "X2tConverter.pro" ];
|
qmakeFlags =
|
||||||
|
qmakeFlags
|
||||||
|
++ icuQmakeFlags
|
||||||
|
++ [
|
||||||
|
"QMAKE_LFLAGS+=-licui18n"
|
||||||
|
"X2tConverter.pro"
|
||||||
|
];
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
source ${fixIcu}
|
source ${fixIcu}
|
||||||
|
|
||||||
|
# We need to build statically to be able to piggy-back
|
||||||
|
# on nodejs's v8
|
||||||
|
substituteInPlace \
|
||||||
|
$BUILDRT/DesktopEditor/doctrenderer/doctrenderer.pri \
|
||||||
|
--replace-fail "CONFIG += shared" "CONFIG += staticlib" \
|
||||||
|
--replace-fail "CONFIG += plugin" ""
|
||||||
|
|
||||||
|
echo "LIBS += -L${nodejs-slim.libv8}/lib -lv8 -pthread" >> $BUILDRT/X2tConverter/build/Qt/X2tConverter.pro
|
||||||
|
echo "LIBS += -L${openssl'.out}/lib -lcrypto" >> $BUILDRT/X2tConverter/build/Qt/X2tConverter.pro
|
||||||
|
|
||||||
# (not as patch because of line endings)
|
# (not as patch because of line endings)
|
||||||
sed -i '47 a #include <limits>' $BUILDRT/Common/OfficeFileFormatChecker2.cpp
|
sed -i '47 a #include <limits>' $BUILDRT/Common/OfficeFileFormatChecker2.cpp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user