Closed nikp123 closed 1 year ago
also i think i can patch onlyoffice instead https://github.com/ONLYOFFICE/core/blob/02c78a1e6fb91260b371ccaa051e5d66a5d637c8/DesktopEditor/fontengine/ApplicationFonts.cpp#L1780
yep https://search.nixos.org/options?channel=22.11&show=fonts.fontDir.enable&from=0&size=50&sort=relevance&type=packages&query=font though, this is a massive hack
didnt work because onlyoffice was built from binary, but they've thankfully added a CUSTOM_PATH to play around with https://github.com/ONLYOFFICE/core/pull/815/commits/68582b65d1ce158b22d0665f096480982df816d6
bummer, it doesn't work with symlinks. though, you could use something like this in order to get fonts to work
worked a bad solution, but it's a solution:
nixpkgs.overlays = [
( self: super: {
onlyoffice-bin = super.onlyoffice-bin.overrideAttrs (old: {
preFixup = (old.preFixup or "") + ''
gappsWrapperArgs+=(
--set CUSTOM_FONTS_PATH "${pkgs.microsoft-fonts}/share/fonts/TTF" # or whatever font you desire to use
)
'';
});
})
];
Yes, ONLYOFFICE has a known issue (which I've reported) when /usr/share/fonts contains symlinks. The ONLYOFFICE module uses the code from fonts.fontDir.enable
but I copy the fonts instead of creating symlinks to them.
I'm unable to reproduce your error. Can you show me the build log?
Yes, ONLYOFFICE has a known issue (which I've reported) when /usr/share/fonts contains symlinks. The ONLYOFFICE module uses the code from
fonts.fontDir.enable
but I copy the fonts instead of creating symlinks to them.I'm unable to reproduce your error. Can you show me the build log?
The log is quite boring, as it's just a simple "folder not found" error. log.txt
I imported your module as a flake, added this to my nixOS modules: erosanix.nixosModules.onlyoffice
And invoked programs.onlyoffice.enable = true
;
I pushed an update that I think will fix it.
The error message is correct in that the given path is not a directory; It's a symlink. The update copies the icons instead of using a symlink. There must be a difference between how that's handled on NixOS 22.11 and NixOS master.
Uh, yeah, more bugs to crush unfortunately.
OK, I see that the package on NixOS 21.11 doesn't have icons. I pushed an update that should work around that.
Works perfectly now, thank you.