commits
This new interface has already been applied successfully in NixOS.
`nixos-generate-hardware` has been generating the "default" hostPlatform
in `hardware-configuration.nix` for over a year now [without much trouble],
and with the benefit of not having to specify `system` (or similar) in
`nixosSystem` anymore.
Furthermore, the `hostPlatform` option is always defined and reliably
produces the host platform for users who don't use the legacy options.
This is in contrast to `nixpkgs.crossSystem`, which is usually not
even defined, and `nixpkgs.localSystem` which is usually the wrong
platform to refer to in a config file.
Ideally we'd clean up the `nixpkgs.{system,localSystem,crossSystem}`
options to reduce complexity and confusion. But the interface in
Nixpkgs is still based on the old terminology and behavior.
By introducing these parameters also in Nixpkgs, the users' experience
with NixOS carries over to Nixpkgs as well.
Further simplifications in the code base are now possible, specifically
- stage.nix and related files still work with {local,cross}System,
and have logic like
${if stdenv.hostPlatform == stdenv.buildPlatform
then "localSystem" else "crossSystem"} = <...>
... which is really just
hostPlatform = <...>
This can now be simplified by refactoring this code to work with
{host,build}Platform variables instead.
- NixOS can forward its platform options directly to its Nixpkgs call.
This pays off when the `*[sS]ystem` options are removed.
[without much trouble]: https://github.com/NixOS/nixpkgs/pull/237218
This reduces the build time from 55s to 25s on my modern 16-core machine.
The main motivation for this step is that I apply a custom patch onto
strace in my NixOS configuration and the build time is longer than necessary.
The debian package definition shows [0] that strace can be reliably build using
multiple makefile jobs.
[0] https://github.com/strace/strace/commit/0c56f62207d81713f9ce7705e865b75f921e6a1b
Changelog: https://github.com/sbmlteam/libsbml/releases/tag/v5.20.4
Diff: https://github.com/Myriad-Dreamin/tinymist/compare/refs/tags/v0.11.20...0.11.22
Changelog: https://github.com/Myriad-Dreamin/tinymist/blob/refs/tags/v0.11.22/CHANGELOG.md
Diff: https://github.com/TencentCloud/tencentcloud-sdk-python/compare/refs/tags/3.0.1242...3.0.1243
Changelog: https://github.com/TencentCloud/tencentcloud-sdk-python/blob/3.0.1243/CHANGELOG.md
Changelog: https://github.com/oracle/python-oracledb/blob/v2.4.1/doc/src/release_notes.rst
Makes this warning by PyLammps go away:
> WARNING: run thermo data not captured since PYTHON LAMMPS package is not enabled
Diff: https://github.com/meshtastic/Meshtastic-python/compare/refs/tags/2.5.0...2.5.1
Changelog: https://github.com/meshtastic/python/releases/tag/2.5.1
Diff: https://github.com/lmfit/asteval/compare/refs/tags/1.0.4...1.0.5
Changelog: https://github.com/lmfit/asteval/releases/tag/1.0.5
This new interface has already been applied successfully in NixOS.
`nixos-generate-hardware` has been generating the "default" hostPlatform
in `hardware-configuration.nix` for over a year now [without much trouble],
and with the benefit of not having to specify `system` (or similar) in
`nixosSystem` anymore.
Furthermore, the `hostPlatform` option is always defined and reliably
produces the host platform for users who don't use the legacy options.
This is in contrast to `nixpkgs.crossSystem`, which is usually not
even defined, and `nixpkgs.localSystem` which is usually the wrong
platform to refer to in a config file.
Ideally we'd clean up the `nixpkgs.{system,localSystem,crossSystem}`
options to reduce complexity and confusion. But the interface in
Nixpkgs is still based on the old terminology and behavior.
By introducing these parameters also in Nixpkgs, the users' experience
with NixOS carries over to Nixpkgs as well.
Further simplifications in the code base are now possible, specifically
- stage.nix and related files still work with {local,cross}System,
and have logic like
${if stdenv.hostPlatform == stdenv.buildPlatform
then "localSystem" else "crossSystem"} = <...>
... which is really just
hostPlatform = <...>
This can now be simplified by refactoring this code to work with
{host,build}Platform variables instead.
- NixOS can forward its platform options directly to its Nixpkgs call.
This pays off when the `*[sS]ystem` options are removed.
[without much trouble]: https://github.com/NixOS/nixpkgs/pull/237218
This reduces the build time from 55s to 25s on my modern 16-core machine.
The main motivation for this step is that I apply a custom patch onto
strace in my NixOS configuration and the build time is longer than necessary.
The debian package definition shows [0] that strace can be reliably build using
multiple makefile jobs.
[0] https://github.com/strace/strace/commit/0c56f62207d81713f9ce7705e865b75f921e6a1b