Previously, only if `withHelp` was `false`, we added the `./configure`
flag `--without-help`, but apparently `--without-help` does nothing, as
not building help is the default behavior. Using `lib.withFeature` gives
the most expected behavior no matter what are the defaults. Quoting from
`./configure --help` for reference:
> --with-help Enable the build of help. There is a special
> parameter "common" that can be used to bundle only
> the common part, .e.g help-specific icons. This is
> useful when you build the helpcontent separately.
>
> Usage: --with-help build the old local help
> --without-help no local help (default)
> --with-help=html build the new HTML local help
> --with-help=online build the new HTML online help
This commit fixes#276400.
This continues where d8f7f6a5ce left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.
Also, similarly to d8f7f6a5ce some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
Broke in 408ece7d3d because the
`disallowedRequisites` fails here since the QT variant apparently needs
to reference a few dev outputs[1].
I won't look into the details of that now, so the easiest way to unbreak
is to skip the check for the QT variant. It should be kept for non-QT
though to make sure that a change similar to the BUILDCONFIG thing isn't
missed again by us.
[1] https://github.com/NixOS/nixpkgs/pull/245361#issuecomment-1651389735
error: output '/nix/store/2y0czyy26gcsqhmcvd2mlqa35f0gcl4l-libreoffice-7.5.4.1' is not allowed to refer to the following paths:
/nix/store/0hmvklj0mbhrn8flwbcwivvkv45limhg-freetype-2.13.0-dev
/nix/store/0rnx7rc87hwkbrhsys7mgwq4jw6pz7ma-zlib-1.2.13-dev
[...]
In v7.5.x a change was introduced that writes the BUILDCONFIG into
`$out/lib/libreoffice/program/libsofficeapp.so` including the
`PKG_CONFIG_PATH` containing references to all `dev` outputs of library
dependencies:
$ strings $(nix-build -A libreoffice-fresh)/lib/libreoffice/program/libsofficeapp.so|grep PKG_CONFIG_PATH
[...], "BuildConfig": "[...] 'PKG_CONFIG_PATH=[...]'"
This isn't really needed because this information can also be obtained
by `nix derivation show`. Also, this causes a 20% larger runtime-closure
because of all the dev dependencies being referenced by the output and
thus downloaded whenever libreoffice is substituted somewhere. The
actual numbers look like this:
$ nix path-info -Sh ./result-old
/nix/store/3mzrqh4gg7v27vdrrap9dj3x8myysmyf-libreoffice-7.5.4.1-wrapped 2.0G
$ nix path-info -Sh ./result
/nix/store/g5y60s0a2q2v6r58xcayv62z7fjfi816-libreoffice-7.5.4.1-wrapped 1.6G
Only `libreoffice-fresh` is affected, `pkgs.libreoffice` isn't because
it still points to 7.4 whereas the problematic change was introduced in
7.5.
To make sure this doesn't get reintroduced by accident, the derivation
also prohibits now to reference any dev output from a build input.
[1] https://gerrit.libreoffice.org/c/core/+/141197
The copying/linking implemented in #220694 resulted in a higher
maintenance burden (need to manually add all new folders in $out/share).
The introduced loop will continue linking everything but the .desktop
files.
Cleanup the unwrapped derivation's postInstall. Delete wrapper.sh, and
put it's contents in the wrapped derivation via configurable
`makeWrapper`. Also, always install dolphin templates in the unwrapped
derivation.
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure