Some packages rely on `uname` to configure the host target which breaks cross-compilation.
We can have more control over the evaluation of `uname` by placing `deterministic-uname` into the package's `nativeBuildInputs`.
However the current `deterministic-uname` is hardcoded to `buildPlatform`.
This PR introduces a build argument `forPlatform` to `deterministic-uname` which allows you to override the platform it reports.
Example:
```nix
deterministic-uname.override { forPlatform = stdenv.hostPlatform; }
```
(cherry picked from commit 2ed51a3ff0)
The $DISPLAY variable has a format of [host]:num[.screen]. Previously,
the number would only be extracted properly if it had the form :num.
Allow all forms but correctly discard the unused parts.
Thanks to Qyriad, it was found out that Nixpkgs was unable to cross
compile when CMake was needed at cross compilation time with Meson
because Meson refuse to use the ambiant CMake.
A simple fix is to always provide the ambiant CMake and trust the
packager to pass the right CMake, otherwise the rest of the build would
probably fail in mysterious ways.
An example of package that required this fix is the Lix, a Nix
implementation, that uses `toml11` discovered via CMake during the Meson
configure phase.
Co-authored-by: Qyriad <qyriad@qyriad.me>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This fixes at least one bug with default-features, and also
just aligns us more with what Cargo actually does.
Also some Python style fixes and a bit less mutating state.
Conflicts in luaPackages.luarocks-nix:
- 8b563cd9f9 switched to the new version format (prefixed by 0 since there was no relevant last tag in the branch).
bc4f6fa543 bumped version and switched to the new version format. But the tag used is not part of the branch the commit comes from (master).
Used the new version but replaced the tag prefix with 0.
- b73ec84b9e removed meta (it is already set in the overridden luarocks). But that would cause the update script to try to update the overridden luarocks (as did the previously used old.meta).
bf311d950e modified meta to fix the update script properly.
Kept the meta from the latter since it allows update script to work.
This fixes:
Could not load ICU data. UErrorCode: 2
We're using a hook instead of a wrapper because various things like to
reference the unwrapped dotnet executable.