[Nix-dev] how to write nix expressions for packages that have plugins

Corey O'Connor coreyoconnor at gmail.com
Thu Oct 16 19:54:51 CEST 2014


There are two methods I've seen:

1. patch the system to support inspecting multiple directories for plugins.
Either specified using an environment variable or command line option.
2. create a merge nix package: A package which takes the application plus
all plugins requested and builds the directory layout the application
expects with all the plugins linked into the right folder. This package is
then added to the environment of the user.

Cheers,
Corey

-Corey O'Connor
coreyoconnor at gmail.com
http://corebotllc.com/

On Thu, Oct 16, 2014 at 8:17 AM, cdep.illabout at gmail.com <
cdep.illabout at gmail.com> wrote:

> Hi,
>
> I'm trying to write a nix expression for a plugin for a package.  I'm
> running into a problem where the package doesn't know where to look
> for the new plugin.
>
> The original package stores all of it's plugins in
> /nix/store/xxx-package/lib/packagename/{plugin1,plugin2,mycoolplugin}.so.
> It expects all of it's plugins to be there.  There doesn't appear to
> be any way of telling the program that it needs to look for plugins in
> other directories.
>
> How is this type of problem usually solved in other nix packages?
>
> The package/plugin combination in question is "fcitx" and
> "fcitx-anthy".  It's an input method editor commonly used to input
> Chinese, Japanese, and Korean (among other languages).  I raised a
> question about this package/plugin combination on github, but I am
> also interested in how it's solved in general.
>
> https://github.com/NixOS/nixpkgs/issues/4550
>
> I have also raised a question on the fcitx issue tracker for anyone
> curious:
>
> https://github.com/fcitx/fcitx/issues/179
>
> Finally, in case anyone wants to look at the the original
> nix-expressions, here they are:
>
> fcitx:
>
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/inputmethods/fcitx/default.nix
>
> fcitx-anthy:
>
> https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/inputmethods/fcitx/fcitx-anthy.nix
>
> Thanks,
> Dennis
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141016/ee28749a/attachment.html 


More information about the nix-dev mailing list