1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 16:27:03 +00:00

nixpkgs: fix determination for cross-compiled nix-darwin system

Since the output of `lib.systems.elaborate` contains functions, an
equality check with `==` does not suffice, `lib.systems.equals` should
be used instead.

Backport of Nixpkgs commit 3794246066409d7baac72e3fdfb0e4f66ef4a013.

Co-authored-by: Jared Baur <jaredbaur@fastmail.com>
This commit is contained in:
Emily 2025-02-03 19:33:20 +00:00
parent 2df9e48110
commit 6b81859ed0

View file

@ -181,7 +181,12 @@ in
example = { system = "x86_64-darwin"; };
# Make sure that the final value has all fields for sake of other modules
# referring to this.
apply = lib.systems.elaborate;
apply = inputBuildPlatform:
let elaborated = lib.systems.elaborate inputBuildPlatform;
in if lib.systems.equals elaborated cfg.hostPlatform
then cfg.hostPlatform # make identical, so that `==` equality works;
see https://github.com/NixOS/nixpkgs/issues/278001
else elaborated;
defaultText = literalExpression
''config.nixpkgs.hostPlatform'';
description = ''