mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-06 08:47:00 +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:
parent
2df9e48110
commit
6b81859ed0
1 changed files with 6 additions and 1 deletions
|
@ -181,7 +181,12 @@ in
|
||||||
example = { system = "x86_64-darwin"; };
|
example = { system = "x86_64-darwin"; };
|
||||||
# Make sure that the final value has all fields for sake of other modules
|
# Make sure that the final value has all fields for sake of other modules
|
||||||
# referring to this.
|
# 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
|
defaultText = literalExpression
|
||||||
''config.nixpkgs.hostPlatform'';
|
''config.nixpkgs.hostPlatform'';
|
||||||
description = ''
|
description = ''
|
||||||
|
|
Loading…
Add table
Reference in a new issue