nixpkgs-suyu/pkgs/applications/office/libreoffice
Maximilian Bosch 2f9426ad83
libreoffice: replace openjdk runtime-input with minimal JRE
Previously, `pkgs.libreoffice` had a total closure-size of 2.4GB where
`pkgs.openjdk` was a significant part:

    $ nix path-info ./result -Sh
    /nix/store/7xyfklmiz2azcnrfa8n9cz12dyyqc85r-libreoffice-7.1.7.2	   2.4G
    $ nix path-info ./result -shr | grep openjdk
    /nix/store/qcn7ihaak9g8ayyj4995ila2z0pkm37i-openjdk-17.0.1+12             	 643.6M

However we need exactly two components:

* a `javac` from `pkgs.openjdk`
* a minimal runtime (i.e. a JRE) for `libofficebean.so` where
  `libjawt.so` is also available.

I moved `jdk` to the `nativeBuildInputs` to ensure that `javac` is still
available in the build-environment and created a minimal JRE that seems
sufficient.

Now, the total closure-size is reduced by ~29.1% (basically the 600M
from `pkgs.openjdk`):

    $ nix path-info ./result -Sh
    /nix/store/zv34xijv64k7sz7rv50g3v6y59qg7p8k-libreoffice-7.1.7.2	   1.7G
2021-11-23 19:23:30 +01:00
..
src-fresh libreoffice-fresh: 7.1.5.2 -> 7.2.2.2 & libreoffice-still: 7.0.6.2 -> 7.1.6.2 2021-10-28 05:55:42 +00:00
src-still libreoffice*: skip test to fix build with icu70 2021-11-13 23:20:26 +08:00
default.nix libreoffice: replace openjdk runtime-input with minimal JRE 2021-11-23 19:23:30 +01:00
download-list-builder.sh
gen-shell.nix
generate-libreoffice-srcs.py
libreoffice-srcs-additions.json
README.md
skip-failed-test-with-icu70.patch libreoffice*: skip test to fix build with icu70 2021-11-13 23:20:26 +08:00
wrapper.nix
wrapper.sh
xdg-open-brief.patch

LibreOffice

To generate src-$VARIANT/download.nix, i.e. list of additional sources that the libreoffice build process needs to download:

nix-shell gen-shell.nix --argstr variant VARIANT --run generate

Where VARIANT is either still or fresh.