Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: attribute 'i686-linux' missing #528

Open
1 task done
RichardWarfield opened this issue Jul 2, 2024 · 1 comment
Open
1 task done

error: attribute 'i686-linux' missing #528

RichardWarfield opened this issue Jul 2, 2024 · 1 comment

Comments

@RichardWarfield
Copy link
Contributor

Context

No response

Bug description

When using the default overlay, I'm seeing the captioned error when trying to nixos-rebuild after upgrading from NixOS 23.11 to 24.05. I noticed that this pr mentioned the same issue, which was supposed to be fixed by this commit, but unfortunately I'm still seeing it on the latest main branch.

error:
       … while calling the 'head' builtin
         at /nix/store/x6x48p4sc7x620zng1iqx4hikffnp32z-source/lib/attrsets.nix:1575:11:
         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'
         at /nix/store/x6x48p4sc7x620zng1iqx4hikffnp32z-source/lib/modules.nix:809:9:
          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'i686-linux' missing
       at /nix/store/221mhp3nr67c41c7k4dhxkh9mmh88rhm-source/pkgs/default.nix:11:5:
           10|   in
           11|     self.packages.${system};
             |     ^
           12|

I've managed to work around this for now by patching pkgs/default.nix:

--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -8,7 +8,7 @@
   flake.overlays.default = _final: prev: let
     inherit (prev.stdenv.hostPlatform) system;
   in
-    self.packages.${system};
+    self.packages.${system} or {};

Steps to reproduce

  1. "ethereum-nix.overlays.default" overlay in the NixOS configuration
  2. Upgrade to 24.05
  3. Rebuild

Before submitting

RichardWarfield pushed a commit to litxio/ethereum.nix that referenced this issue Jul 2, 2024
@scottbot95
Copy link
Contributor

Some messing around with this, it appears to be a bug in NixOS itself. Something like import <nixpkgs> { overlays = [(_: prev: builtins.trace prev.stdenv.hostPlatform.system {} ]; } works perfectly well and prints the correct system. However if you try to make a simple NixOS config containing nixpkgs.overlays with the same debug overlay, with NixOS 23.11 it works as expected however starting in NixOS 24.05, for some reason the hostplatform just gets randomly changed to i686-linux.

I have created an issue on NixOS for this bug NixOS/nixpkgs#325318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants