From 45c845c6fee3c4a38ec00150462f69219b7aece9 Mon Sep 17 00:00:00 2001 From: Alexei Robyn Date: Sun, 8 Sep 2019 17:42:07 +1000 Subject: [PATCH] Workaround/fix for issue #68 --- data/eval-machines.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/data/eval-machines.nix b/data/eval-machines.nix index a343ec7..0906934 100644 --- a/data/eval-machines.nix +++ b/data/eval-machines.nix @@ -37,12 +37,16 @@ rec { nixpkgs.localSystem = lib.mkDefault pkgs.buildPlatform; nixpkgs.crossSystem = lib.mkDefault pkgs.hostPlatform; nixpkgs.overlays = lib.mkDefault pkgs.overlays; - nixpkgs.pkgs = lib.mkDefault (import pkgs.path { - inherit (config.nixpkgs) overlays localSystem crossSystem; + nixpkgs.pkgs = lib.mkDefault (import pkgs.path ({ + inherit (config.nixpkgs) overlays localSystem; # Merge nixpkgs.config using its merge function config = options.nixpkgs.config.type.merge "" ([ { value = pkgs.config; } options.nixpkgs.config ]); - }); + } // lib.optionalAttrs (config.nixpkgs.localSystem != config.nixpkgs.crossSystem) { + # Only override crossSystem if it is not equivalent to + # localSystem; works around issue #68 + inherit (config.nixpkgs) crossSystem; + })); }) ]; extraArgs = { inherit nodes ; name = machineName; };