How to get gedit-plugins

Context: I’m a novice using NixOS.

gEdit (the default GNOME text editor) has two curated sets of plugins: core plugins and the gedit-plugins “package”. Core plugins are distributed along with gEdit and so are available when I get gEdit from nixpkgs. I’d like to have excess to the “package” part too, though.

I tried the standard way to install gEdit 3rd party plugins locally: just coping sources to ~/.local/share/gedit/plugins. That didn’t work. I guess, because gEdit doesn’t know about my home directory. What would be the next easiest way to get the plugins working?

I know some other Linux distributions have the gnome-plugins package available in their software repository. How hard would it be to package them in nixpkgs? If someone could mentor me in doing that, I’d be interested in looking into it.

gedit probably knows about your home directory but the gedit-plugins project is partly written in C so it needs to be compiled, and even for the Python plug-ins the desktop files need to be generated.

You are probably better off creating a Nix package, see #nixos on 2021-02-02 — irc logs

But using that is still non-trivial. Gedit will need to know where the plug-ins are installed. You will need to patch the source code, for example, like we do in nautilus.

2 Likes

Thanks for the answer! This sounds a bit above my skills. I tried to build it from source (the best way I understand: entering nix-shell with the right set of dependencies and call meson build), and it seemed to build fine, but linking one plugin dir of interest (wordcompletion) under ~/.local/share/gedit/plugins still doesn’t make any difference.