wrappers: inherit platform config tuples

Nixvim wrapper modules passed the host nixpkgs' fully elaborated stdenv.{host,build}Platform attrsets into Nixvim's own nixpkgs import.

When the host and Nixvim nixpkgs revisions disagreed, those platform attrsets could be re-elaborated by a different lib.systems, causing eval recursion or platform-schema errors.

Pass only { config = ...; } as the inherited platform spec instead. This keeps ABI/libc details while letting Nixvim's selected nixpkgs elaborate the platform itself.
This commit is contained in:
Austin Horstman
2026-06-29 04:20:49 +00:00
parent dbf9550dba
commit adfa139f94
+2 -2
View File
@@ -44,8 +44,8 @@ let
pkgs = lib.mkIf config.nixpkgs.useGlobalPackages (lib.mkDefault pkgs);
# Inherit platform spec
hostPlatform = lib.mkOptionDefault pkgs.stdenv.hostPlatform;
buildPlatform = lib.mkOverride buildPlatformPrio pkgs.stdenv.buildPlatform;
hostPlatform = lib.mkOptionDefault { inherit (pkgs.stdenv.hostPlatform) config; };
buildPlatform = lib.mkOverride buildPlatformPrio { inherit (pkgs.stdenv.buildPlatform) config; };
};
};