|
146 | 146 | example = {
|
147 | 147 | system = "aarch64-linux";
|
148 | 148 | };
|
149 |
| - apply = lib.systems.elaborate; |
| 149 | + # FIXME: An elaborated platform is not supported, |
| 150 | + # but an `apply` function is probably still needed. |
| 151 | + # See https://github.com/NixOS/nixpkgs/pull/376988 |
150 | 152 | defaultText = lib.literalMD ''
|
151 | 153 | - Inherited from the "host" configuration's `pkgs`
|
152 | 154 | - Or `evalNixvim`'s `system` argument
|
|
167 | 169 | example = {
|
168 | 170 | system = "x86_64-linux";
|
169 | 171 | };
|
170 |
| - apply = |
171 |
| - value: |
172 |
| - let |
173 |
| - elaborated = lib.systems.elaborate value; |
174 |
| - in |
175 |
| - # If equivalent to `hostPlatform`, make it actually identical so that `==` can be used |
176 |
| - # See https://github.com/NixOS/nixpkgs/issues/278001 |
177 |
| - if lib.systems.equals elaborated cfg.hostPlatform then cfg.hostPlatform else elaborated; |
| 172 | + # FIXME: An elaborated platform is not supported, |
| 173 | + # but an `apply` function is probably still needed. |
| 174 | + # See https://github.com/NixOS/nixpkgs/pull/376988 |
178 | 175 | defaultText = lib.literalMD ''
|
179 | 176 | Inherited from the "host" configuration's `pkgs`.
|
180 | 177 | Or `config.nixpkgs.hostPlatform` when building a standalone nixvim.
|
|
215 | 212 | inherit (cfg) config overlays;
|
216 | 213 | };
|
217 | 214 |
|
| 215 | + elaborated = builtins.mapAttrs (_: lib.systems.elaborate) { |
| 216 | + inherit (cfg) buildPlatform hostPlatform; |
| 217 | + }; |
| 218 | + |
218 | 219 | # Configure `localSystem` and `crossSystem` as required
|
219 | 220 | systemArgs =
|
220 |
| - if cfg.buildPlatform == cfg.hostPlatform then |
| 221 | + if lib.systems.equals elaborated.buildPlatform elaborated.hostPlatform then |
221 | 222 | {
|
222 | 223 | localSystem = cfg.hostPlatform;
|
223 | 224 | }
|
|
0 commit comments