nix-community / neovim-nightly-overlay

[maintainer=@GaetanLepage, @willruggiano]
https://matrix.to/#/#neovim-nightly-overlay:nixos.org
287 stars 39 forks source link

Error: attribute 'overlay' missing #525

Closed dgabka closed 1 month ago

dgabka commented 1 month ago

system = "x86_64-darwin"

Cannot rebuild after update to current master (d83afee), because of the following error:

       error: attribute 'overlay' missing

       at /nix/store/ns3isfpif5jghi842nna56z6nsh3gnb7-source/nix-system/flake.nix:30:11:

           29|         overlays = [
           30|           neovim-nightly-overlay.overlay
             |           ^
           31|         ];
       Did you mean overlays?

My config:

{
  inputs = {
    ...
    neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
  };
  outputs = inputs @ {
    nixpkgs,
    darwin,
    home-manager,
    neovim-nightly-overlay,
    ...
  }: {
    darwinConfigurations.Mac = darwin.lib.darwinSystem {
      system = "x86_64-darwin";
      pkgs = import nixpkgs {
        system = "x86_64-darwin";
        overlays = [
          neovim-nightly-overlay.overlay
        ];
      };
      modules = [ ... ];
    };
  };
}

After trying to change to neovim-nightly-overlay.overlays I get:

error: All overlays passed to nixpkgs must be functions.

karlskewes commented 1 month ago

Try: neovim-nightly-overlay.overlays.default

See: https://github.com/nix-community/neovim-nightly-overlay/pull/523

stefanwatt commented 1 month ago

I have the same issue and using default doesn't work for me.

error: attribute 'default' missing

       at /nix/store/gpy0r0av8zvl2hzgz4vzcl7jzx94vh6y-source/home/neovim.nix:6:24:

            5| in {
            6|   nixpkgs.overlays = [ inputs.neovim-nightly-overlay.default ];
             |                        ^
            7|   home.packages = with pkgs; [
FAIL
arminveres commented 1 month ago

@stefanwatt had the same issue, you're missing .overlays.default, try this:

inputs.neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
  outputs =
    inputs@{ self
    , ...
    , neovim-nightly
    , ...
    }:{
let
      pkgs = import nixpkgs {
        system = systemSettings.system;
        overlays = [ neovim-nightly.overlays.default ];
        config = { allowUnfree = true; };
      };
in
...
}

This solved it for me.

dgabka commented 1 month ago

after using neovim-nightly-overlay.overlays.default

         1097|

       … from call site

         at /nix/store/13yi9jfgyhzh0wcwxhblzljafyanfsn6-source/lib/attrsets.nix:1096:16:

         1095|     attrs:
         1096|     map (name: f name attrs.${name}) (attrNames attrs);
             |                ^
         1097|

       … while calling anonymous lambda

         at /nix/store/13yi9jfgyhzh0wcwxhblzljafyanfsn6-source/pkgs/by-name/ne/neovim-unwrapped/package.nix:172:18:

          171|     '' + lib.concatStrings (lib.mapAttrsToList
          172|       (language: src: ''
             |                  ^
          173|         ln -s \

       … while evaluating derivation 'bash-grammar-neovim-nightly'
         whose name attribute is located at /nix/store/13yi9jfgyhzh0wcwxhblzljafyanfsn6-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'src' of derivation 'bash-grammar-neovim-nightly'

         at /nix/store/13yi9jfgyhzh0wcwxhblzljafyanfsn6-source/pkgs/by-name/ne/neovim-unwrapped/package.nix:175:20:

          174|           ${tree-sitter.buildGrammar {
          175|             inherit language src;
             |                    ^
          176|             version = "neovim-${finalAttrs.version}";

       error: cannot coerce a set to a string
dgabka commented 1 month ago

After updating also nixpkgs and home-manager:

error: builder for '/nix/store/4dmza51rcr0s9sxi0x9ygi7568chrm0v-libiconv-99.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/xrs3l6hf4a2jhb2h6ra6a78w4pln4ijm-neovim-unwrapped-nightly.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zbldr7lvjbfa46wp1lv28mn5f10nv983-home-manager-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yrygv4zwlwn10393gf9dvp5rfz2zfkss-home-manager-fonts.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zwww9wp7il5nq6xpqx975p3wc54368m3-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qs6qwp7smzk7bsjjiydwifzjk418bv8v-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wqsf0y82n4y4c68ab86893xkk628rlc6-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gnpvid6mdakqsjc103a4wy5m2fgs15bh-activation-dgabka.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cc0x07rxg99ixyxjpwrvnv6wql2v7hv1-darwin-system-24.11pre-git+darwin4.0bea822.drv' failed to build

note: without Neovim overlay the rest of the config works fine

GaetanLepage commented 1 month ago

Please, run nix flake update. This should be fixed now.