This `substituteInPlace` was introduced in 2016 when cmake was at v3.4:
* https://github.com/NixOS/nixpkgs/commit/5286c0aebb
In 2018 cmake v3.12.0 changed the code to make it not match anything:
* https://github.com/Kitware/CMake/commit/50b5e9ed13
```
substituteStream(): WARNING: pattern '${PYTHON_EXECUTABLE}' doesn't match anything in file 'Modules/FindCxxTest.cmake'
```
Having it around in 2021 with cmake v3.19.3 doesn't help,
and tests are disabled anyway.
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.
This fixes issues with building LibreSSL, which is required for the
NixOS tests: https://cmake.org/cmake/help/latest/release/3.19.html#id1
> CMake 3.19.0 compiles source files with the `LANGUAGE` property by
> passing an explicit language flag such as -x c. This is consistent
> with the property’s documented meaning that the source file is written
> in the specified language. However, it can break projects that were
> using the property only to cause the specified language’s compiler to
> be used. This has been reverted to restore behavior from CMake 3.18
> and below.
This reverts commit c778945806.
I believe this is exactly what brings the staging branch into
the right shape after the last merge from master (through staging-next);
otherwise part of staging changes would be lost
(due to being already reachable from master but reverted).
- OpenSSL is evidentally an optional dep. I guess pkg-config found it
before because it was a transitive dep?
- `zstd` and cross-built CMake can get by with a `cmakeMinimal that we
use during bootstrapping, so let's restrict to that.
pkg-config now has a target-sensative wrapper. We shouldn't rebuild
CMake because that wrapper changes. The setup hook should also be a
build time dep.
Fix #99325
I hate the thing too even though I made it, and rather just get rid of
it. But we can't do that yet. In the meantime, this brings us more
inline with autoconf and will make it slightly easier for me to write a
pkg-config wrapper, which we need.
cf-private is not necessary here. cmake just needs the CoreFoundation
framework to be used. swift-corefoundation seems to work fine in this case.
/cc @lnl7