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 'overrideScope'' missing #411

Closed
andy-bell101 opened this issue Nov 30, 2024 · 4 comments
Closed

error: attribute 'overrideScope'' missing #411

andy-bell101 opened this issue Nov 30, 2024 · 4 comments

Comments

@andy-bell101
Copy link

andy-bell101 commented Nov 30, 2024

When rebuilding my system on the latest nixpkgs-unstable, I get the following error:

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

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

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/4wjygyks9w9z3548738hpfjnaqvwxmcw-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `system.systemBuilderArgs':

       … while evaluating definitions from `/nix/store/4wjygyks9w9z3548738hpfjnaqvwxmcw-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `system.build.installBootLoader':

       … while evaluating definitions from `/nix/store/4wjygyks9w9z3548738hpfjnaqvwxmcw-source/nixos/modules/system/boot/loader/external/external.nix':

       … while evaluating the option `boot.loader.external.installHook':

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

       error: attribute 'overrideScope'' missing
       at /nix/store/xb195011i3my7fda4bqzygml3j3x6r9k-source/lib/default.nix:53:34:
           52|
           53|   overrideToolchain = toolchain: self.overrideScope' (_final: _prev: {
             |                                  ^
           54|     cargo = toolchain;
       Did you mean overrideScope?

I think the root cause is just that the flake.lock needs updating to pick up the latest changes in crane. It looks like there is a PR to update the lockfile in progress #408, but the build is broken.

@andy-bell101 andy-bell101 changed the title Broken on nixpkgs-unstable error: attribute 'overrideScope'' missing Nov 30, 2024
@Coca162
Copy link

Coca162 commented Dec 2, 2024

For anybody who wants a temporary fix you can override crane to the specific commit where they started using overrideScope by doing nix flake update --override-input lanzaboote/crane github:ipetkov/crane/f2926e34a1599837f3256c701739529d772e36e7 since it doesn't seem like it breaks with lanzaboote

Cowboylaserkittenjetshark added a commit to Cowboylaserkittenjetshark/nixos-config that referenced this issue Dec 8, 2024
clemenscodes added a commit to clemenscodes/lanzaboote that referenced this issue Dec 15, 2024
@Spiker985
Copy link

Something that I forgot to do, personally - update my flake.nix input to pin lanzaboote to release 0.4.1 from 0.3.0

But after a nix flake update it appears to be working fine. So I recommend updating your pinned version. The documentation is also already updated to include that, but since we're (rightfully) pinning the version in the flake instead of the lock file - it needs a bit more attention to detail

@schuelermine
Copy link

This was fixed for me by running nix flake update again

@andy-bell101
Copy link
Author

Yeah looks like updating the pinned version of lanzaboote in my flake and running nix flake update fixed this issue.

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

4 participants