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 'src' missing from 'bash-grammar-neovim-3b29b39' #521

Closed
LamprosPitsillos opened this issue May 24, 2024 · 7 comments
Closed

Comments

@LamprosPitsillos
Copy link

warning: Git tree '/home/inferno/.nixos-config' is dirty
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'home-manager-generation'
         whose name attribute is located at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'buildCommand' of derivation 'home-manager-generation'

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/build-support/trivial-builders/default.nix:68:16:

           67|         enableParallelBuilding = true;
           68|         inherit buildCommand name;
             |                ^
           69|         passAsFile = [ "buildCommand" ]

       … while evaluating derivation 'activation-script'
         whose name attribute is located at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'text' of derivation 'activation-script'

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/build-support/trivial-builders/default.nix:103:16:

          102|       ({
          103|         inherit text executable checkPhase allowSubstitutes preferLocalBuild;
             |                ^
          104|         passAsFile = [ "text" ]

       … while calling 'mkCmd'

         at /nix/store/mmr990n8xyrca739nzwr6zq0ncgbg0zx-source/modules/home-environment.nix:666:17:

          665|       let
          666|         mkCmd = res: ''
             |                 ^
          667|             _iNote "Activating %s" "${res.name}"

       … while calling anonymous lambda

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/attrsets.nix:1205:18:

         1204|         mapAttrs
         1205|           (name: value:
             |                  ^
         1206|             if isAttrs value && cond value

       … from call site

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/attrsets.nix:1208:18:

         1207|             then recurse (path ++ [ name ]) value
         1208|             else f (path ++ [ name ]) value);
             |                  ^
         1209|     in

       … while calling anonymous lambda

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/modules.nix:242:72:

          241|           # For definitions that have an associated option
          242|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          243|

       … while evaluating the option `home.activation.installPackages.data':

       … while calling anonymous lambda

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/modules.nix:824:28:

          823|         # Process mkMerge and mkIf properties.
          824|         defs' = concatMap (m:
             |                            ^
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/mmr990n8xyrca739nzwr6zq0ncgbg0zx-source/modules/home-environment.nix':

       … from call site

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/modules.nix:825:137:

          824|         defs' = concatMap (m:
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          826|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       … while evaluating derivation 'home-manager-path'
         whose name attribute is located at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'passAsFile' of derivation 'home-manager-path'

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/build-support/trivial-builders/default.nix:69:9:

           68|         inherit buildCommand name;
           69|         passAsFile = [ "buildCommand" ]
             |         ^
           70|           ++ (derivationArgs.passAsFile or [ ]);

       … while evaluating derivation 'neovim-3b29b39'
         whose name attribute is located at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'buildPhase' of derivation 'neovim-3b29b39'

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/applications/editors/neovim/wrapper.nix:166:5:

          165|
          166|     buildPhase = ''
             |     ^
          167|       runHook preBuild

       … while evaluating derivation 'neovim-unwrapped-3b29b39'
         whose name attribute is located at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'preConfigure' of derivation 'neovim-unwrapped-3b29b39'

         at /nix/store/f8312pz7xyzsrv1aizfhcr6m84wbgl65-source/contrib/flake.nix:62:11:

           61|           src = ../.;
           62|           preConfigure = oa.preConfigure or "" + ''
             |           ^
           63|             sed -i cmake.config/versiondef.h.in -e 's/@NVIM_VERSION_PRERELEASE@/-dev-${version}/'

       … while calling anonymous lambda

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/attrsets.nix:1096:10:

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

       … from call site

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-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/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/by-name/ne/neovim-unwrapped/package.nix:176:18:

          175|     '' + lib.concatStrings (lib.mapAttrsToList
          176|       (language: grammar: ''
             |                  ^
          177|         ln -s \

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

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

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/by-name/ne/neovim-unwrapped/package.nix:179:30:

          178|           ${tree-sitter.buildGrammar {
          179|             inherit (grammar) src;
             |                              ^
          180|             version = "neovim-${finalAttrs.version}";

       error: attribute 'src' missing

       at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/pkgs/by-name/ne/neovim-unwrapped/package.nix:178:39:

          177|         ln -s \
          178|           ${tree-sitter.buildGrammar {
             |                                       ^
          179|             inherit (grammar) src;
       Did you mean url?

@willruggiano
Copy link
Contributor

willruggiano commented May 24, 2024

Are you overriding the nixpkgs input for this flake?

@LamprosPitsillos
Copy link
Author

@Townk
Copy link

Townk commented May 24, 2024

I'm having the same issue after trying to upgrade to the latest version. This is what I'm using as an overlay:

  pkgs =
    (import nixpkgs {
      inherit system;
      config = {
        allowUnfree = true;
        allowBroken = false;
        allowInsecure = false;
        allowUnsupportedSystem = false;
        permittedInsecurePackages = [];
      };
      overlays =
        [neovim-nightly.overlays.default yazi.overlays.default]
        ++ lib.lists.optional (builtins.pathExists "${./.}/overlays")
        (_: prev: lib.importModuleTreeAsAttrs ./overlays {pkgs = prev;});
    })
    // {
      inherit lib;
    };

Notice that I had to use neovim-nightly.overlays.default as an overlay because simply using neovim-nightly.overlay as the README indicates fails due to the neovim-nightly not having the attribute overlay.

I'm doing all that configuration there to allow me to drop some local overlays on a directory and get my setup to find them and use them, but as of now, the only overlays I'm using are the neovim-nightly and yazi.

@willruggiano
Copy link
Contributor

willruggiano commented May 24, 2024

@LamprosPitsillos This is what I'm talking about; https://github.com/LamprosPitsillos/nixos-config/blob/147db4fbd2f33fea237cdfc726fa1fdad6f14973/flake.nix#L14

If you are overriding the nixpkgs input for this flake, you need to ensure that it is at least NixOS/nixpkgs@d5786c1 or newer

This should be added to the README, along with various other fixes as @Townk points out

@Townk
Copy link

Townk commented May 25, 2024

Thanks for the response, but in my case I'm not overriding the flake input at all. Any ideas to work around this issue?

@willruggiano
Copy link
Contributor

Thanks for the response, but in my case I'm not overriding the flake input at all. Any ideas to work around this issue?

You're using overlays, so the same semantic applies. Make sure that your nixpkgs, or whatever your base package set, is at least the nixpkgs version previously specified.

If you have a code link I'm happy to troubleshoot with you.

@LamprosPitsillos
Copy link
Author

i had neovim flake locked to a specific commit

I removed that and it now built fine , probably that was the issue , i forgot to unlock it some time ago

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

3 participants