Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libreoffice: merge -still and -fresh into common expression #75850

Merged
merged 1 commit into from Dec 19, 2019

Conversation

mmilata
Copy link
Member

@mmilata mmilata commented Dec 18, 2019

This is my attempt to refactor the packages so that most of their build expression is shared. Each variant of LibreOffice gets its own subdirectory src-$variant/ where files w/ source references are stored. In the directory is also override.nix which allows you to override derivation attributes in addition to source files.

The derivation of the -fresh package doesn't change so it doesn't get rebuilt. For the -still package I believe the changes are harmless (still building it though):

-    for a in sbase scalc sdraw smath swriter simpress soffice; do
+    for a in sbase scalc sdraw smath swriter simpress soffice unopkg; do
       ln -s $out/lib/libreoffice/program/$a $out/bin/$a
     done
...
       gst_all_1.gst-plugins-base glib libmysqlclient
-      neon nspr nss openldap openssl ORBit2 pam perl poppler
+      neon nspr nss openldap openssl ORBit2 pam perl pkgconfig poppler
       python3 sane-backends unzip vigra which zip zlib
Motivation for this change
  • The expressions are almost identical
  • I'm trying to package LibreOffice Online which may introduce the need to build yet another variant - Collabora maintains their own branch for it
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @7c6f434c @peterhoeg

@mmilata mmilata changed the title libreoffice: merge -still and -fresh into common derivation libreoffice: merge -still and -fresh into common expression Dec 18, 2019
@ofborg ofborg bot requested a review from 7c6f434c December 18, 2019 02:06
@7c6f434c
Copy link
Member

7c6f434c commented Dec 18, 2019

That's a bit of a novel experience for me: an ofBorg check on LibreOffice (even the x86_64 one) passing without timeout.

@7c6f434c
Copy link
Member

BTW, does that create a dangling internal symlink to unopkg, or did we just not need it in the Still before?

Each "variant" of libreoffice gets its own subdirectory src-$variant
where files w/ source references are stored. In the directory is also
override.nix which allows you to override derivation attributes in
addition to source files.
@mmilata
Copy link
Member Author

mmilata commented Dec 18, 2019

Still does have unopkg:

/nix/store/sbh2wv63c3hqqwc6qh47m9gcqp2wj19j-libreoffice-6.2.6.2/lib/libreoffice/program/unopkg

Looks like for 6.1 we used to create the symlink but lost it for 6.2: 2bc8c67

I made a small change to the PR where all arguments to the default.nix are passed to override.nix to make it more flexible.

@ofborg ofborg bot requested a review from 7c6f434c December 18, 2019 12:33
@7c6f434c 7c6f434c merged commit d7a0236 into NixOS:master Dec 19, 2019
@mmilata mmilata deleted the libreoffice-refactor branch December 19, 2019 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants