Skip to content

[BUG] removal of magick from image plugin breaks my neovim config with nixvim #3140

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

Closed
1 task done
f0rdprefect opened this issue Apr 1, 2025 · 1 comment · Fixed by #3232
Closed
1 task done
Labels
bug Something isn't working

Comments

@f0rdprefect
Copy link

f0rdprefect commented Apr 1, 2025

First of all thank you for all your magic work with nixvim. Helped me to up my neovim game several levels ;).

Field Description
Plugin image
Nixpkgs unstable
Home Manager unstable
  • I have read the FAQ and my bug is not listed there.

Description

after recent update I got neovim complaining about magick missing:

im.lsp.get_active_clients() is deprecated. Run ":checkhealth vim.depre            
image.nvim: magick rock not found, please install it and restart your editor. Error
: "module 'magick' not found:\n\tno field package.preload['magick']\n\tcache_loader
: module 'magick' not found\n\tcache_loader_lib: module 'magick' not found\n\tno fi
le '/nix/store/q1lf0jbc4imxr2yz4m4xlf3vq7h0qhn0-luajit2.1-lua-utils.nvim-1.0.2-1/sh
are/lua/5.1/magick.lua'\n\tno file '/nix/store/q1lf0jbc4imxr2yz4m4xlf3vq7h0qhn0-lua
jit2.1-lua-utils.nvim-1.0.2-1/share/lua/5.1/magick/init.lua'\n\tno file '/nix/store
/714niwwfbij44f1h05x1w9hxcidwwihp-luajit-2.1.1741730670/share/lua/5.1/magick.lua'\n
\tno file '/nix/store/ws1yi3vfk9ylcps43h6i6j82mpa4z3q4-luajit2.1-nui.nvim-0.3.0-1/s
hare/lua/5.1/magick.lua'\n\tno file '/nix/store/ws1yi3vfk9ylcps43h6i6j82mpa4z3q4-lu
ajit2.1-nui.nvim-0.3.0-1/share/lua/5.1/magick/init.lua'\n\tno file '/nix/store/5zfy
6zfxqrxglwm6b2rz77bb6b8xs9vm-luajit2.1-nvim-nio-1.10.1-1/share/lua/5.1/magick.lua'\
n\tno file '/nix/store/5zfy6zfxqrxglwm6b2rz77bb6b8xs9vm-luajit2.1-nvim-nio-1.10.1-1
/share/lua/5.1/magick/init.lua'\n\tno file '/nix/store/zvikc9yvn9g9c4n68zfhvszvydbp
yzmm-luajit2.1-pathlib.nvim-2.2.3-1/share/lua/5.1/magick.lua'\n\tno file '/nix/stor
e/zvikc9yvn9g9c4n68zfhvszvydbpyzmm-luajit2.1-pathlib.nvim-2.2.3-1/share/lua/5.1/mag
ick/init.lua'\n\tno file '/nix/store/cbl8xqzl4sa19q3wf0k2l7mqf83y0jm4-luajit2.1-ple
nary.nvim-scm-1/share/lua/5.1/magick.lua'\n\tno file '/nix/store/cbl8xqzl4sa19q3wf0
k2l7mqf83y0jm4-luajit2.1-plenary.nvim-scm-1/share/lua/5.1/magick/init.lua'\n\tno fi
le '/nix/store/s6m053jn5s3pnd5gfahyplrb28rswfsa-luajit2.1-luassert-1.9.0-1/share/lu
a/5.1/magick.lua'\n\tno file '/nix/store/s6m053jn5s3pnd5gfahyplrb28rswfsa-luajit2.1
-luassert-1.9.0-1/share/lua/5.1/magick/init.lua'\n\tno file '/nix/store/8ihhpaaq1qg
v5hakhqzx1hmvsx5gxj32-luajit2.1-say-1.4.1-3/share/lua/5.1/magick.lua'\n\tno file '/
nix/store/8ihhpaaq1qgv5hakhqzx1hmvsx5gxj32-luajit2.1-say-1.4.1-3/share/lua/5.1/magi
ck/init.lua'\n\tno file '/nix/store/76sknx5rv9pg0zjwzffmahkc758clkwj-luajit-2.1.174
1730670-env/share/lua/5.1/magick.lua'\n\tno file '/nix/store/76sknx5rv9pg0zjwzffmah
kc758clkwj-luajit-2.1.1741730670-env/share/lua/5.1/magick/init.lua'\n\tno file '/ni
x/store/76sknx5rv9pg0zjwzffmahkc758clkwj-luajit-2.1.1741730670-env/lib/lua/5.1/magi
ck.so'\n\tno file '/nix/store/kl1zmhd8hgxkaz6xyv0nim0baky0ax6b-vim-pack-dir/pack/my
NeovimPackages/start/vimplugin-plugin-pack/lua/../build/magick.so'" 

digging into issues I found that

extraLuaPackages = ps: [ ps.magick ];

had been removed from the source of the image plugin. If I put it back in my config this solves my error.

I hoped that NixOS/nixpkgs#389851 would fix it -- should be in unstable by now -- but I still get this error.

Minimal, Reproducible Example (MRE)

{ inputs, lib, ... }:
{
  imports = [
    inputs.nixvim.homeManagerModules.nixvim
    ];
  programs.nixvim = {

    plugins = {
      diagram.enable = true;
      image = {
        enable = true;
        settings = {
          integrations = {
            neorg.enabled = true;
            markdown.enabled = true;
          };
          backend = "kitty";
        };
      };
  };
    # WIP
    #extraLuaPackages = ps: [ ps.magick ]; #thats the line...
    # END WIP

    enable = true;
    defaultEditor = true;

    performance = {
      combinePlugins = {
        enable = true;
      };
      byteCompileLua.enable = true;
    };

    viAlias = true;
    vimAlias = true;

    luaLoader.enable = true;
  };
}
@f0rdprefect f0rdprefect added the bug Something isn't working label Apr 1, 2025
@GaetanLepage
Copy link
Member

Yes, our last nixpkgs bump included regressions related to the combinePlugins option.
Our CI caught those regressions, but we were not able to come with a fix. We decided to push through and merge the update. As a reminder, this feature is still marked as experimental.

Workarounds:

  • A) Simply disable performance.combinePlugins
  • B) Alternatively, manually add the missing dependencies to the top-level extraPlugins option.

Sorry for this :/

jalil-salame added a commit to jalil-salame/configuration.nix that referenced this issue Apr 9, 2025
It is experimental (and thus expected to break). It was working fine but
now I ran into nix-community/nixvim#3140
ZainKergaye added a commit to ZainKergaye/nixosdotfiles that referenced this issue Apr 15, 2025
@mergify mergify bot closed this as completed in #3232 Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants