I ended up doing something a little different here. I ended up writing a wrapper package (a little bit like the firefox wrapper package) that installs all the requested plugins in it's postInstall phase.
https://github.com/NixOS/nixpkgs/pull/4713 However, this seems kind of hackish, so it would be nice if someone could take a look at it and let me know if there is a good way to improve it. 2014-10-17 8:44 GMT+09:00 [email protected] <[email protected]>: >> There are two methods I've seen: >> (...) >> 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. > > Can you give an example of a package in nix that is using this > approach? I'm interested in how to go about writing a nix-expression > that does this. > >> >> On Thu, Oct 16, 2014 at 8:17 AM, [email protected] >> <[email protected]> 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 >>> [email protected] >>> http://lists.science.uu.nl/mailman/listinfo/nix-dev >> >> _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
