On `nixpkgs` SDL2 explicitly bulds RUNPATHs from it's subset of build
inputs. As a result RUNPATH contains more than needed. This change
repomed from RUNPATH packages that don't contain libraries but contain
developer-only files:
- wayland-protocols: xml files to describe protocols
- xorgproto: header files for X11
The change moves them to buildInputs / propagatedBuildInputs.
Before the change closure size is:
$ nix path-info -rsSh $(nix-build -A SDL2) | nl
221 /nix/store/...-SDL2-2.26.4 2.5M 546.5M
After the change:
$ nix path-info -rsSh $(nix-build -A SDL2) | nl
219 /nix/store/...-SDL2-2.26.4 2.5M 544.4M
SDL2 supports both fcitx 4 and fcitx 5 though the dbus interface,
and the dependency on fcitx headers has been removed in favor of
hardcoding the constants.
Reference: https://github.com/libsdl-org/SDL/issues/3653
continuation of #109595
pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.
python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
Fixes#103346. The environment var for finding the cmake companion libs
headers was missing from the SDL2::SDL2 target, it only worked when
using SDL2_INCLUDE_DIRS.
Most other packages don't move `.a` files to "$dev", and that is because
it makes the pkg-config `.pc` file wrong (the `libdir` is the non-dev one).
Keeping them in the main output makes static linking of SDL2 work.
See added comment about pruning of `.la` files.
The SDL2_PATH environment variable is space-separated. However, CMake
lists are semicolon separated, and doing set(list "a" ${var}) will end
up with list containing "a;b c d". This causes downstream users to fail
parsing the include dirs list.
Normalize the include dirs list to a normal CMake semicolon-separated
list using separate_arguments.