This is a reversed patch of https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6426.
_CURRENT_OSX_VERSION isn't set properly, which causes this condition to fail,
which means we don't get CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG which means
we can't compile libcxx. Ugh.
Adds the SystemConfiguration framework to buildInputs unless we're
bootstrapping.
For the bootstrap version, we revert
31f631a142
instead so CMake builds without SystemConfiguration.
cmake on darwin now depends on the SystemConfiguration framework.
Support for this has not yet been added to our bootstrapping.
We need to decide how to go further. As this is blocking staging-next
it is reverted.
This reverts commit 29bbaa1489.
Also removing a comment that instructs maintainers to cross-check
the hash with one that is posted upstream, because as @lilyball
reasoned:
"I'm not really sure what the benefit of comparing the hash is; if the
download is tampered with, the hash is served from the same site and
would presumably be tampered with as well, and the download is done over
https and declares its Content-Length so there's no risk of truncation
(which would cause the file to fail to unpack anyway)"
By default, the cmake derivation contains the documentation in .rst
format. This format is not well suited for interactive use. Therefore,
we add both man and info outputs and convert the documentation to
these formats using Sphinx.
These formats are enabled by default only in cmake versions for
interactive use (ncurses, Qt), because using Sphinx in the basic
version leads to circular dependency (infinite recursion). Namely,
Sphinx has imagemagick in its checkInputs and imagemagick has several
transitive dependencies, which have cmake in nativeBuildInputs.
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.