From f57fb2ee26bd3df7e094a9bfcce9c1103baee455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Wed, 4 Apr 2018 14:33:50 +0200 Subject: [PATCH 1/3] weechat: add hint in documentation --- doc/package-notes.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/package-notes.xml b/doc/package-notes.xml index 2d6c87c3d07..1fccfd5d329 100644 --- a/doc/package-notes.xml +++ b/doc/package-notes.xml @@ -713,7 +713,7 @@ the inotify.py script in weechat-scripts requires D-Bus or libnotify, and the fish.py script requires pycrypto. To use these scripts, use the python plugin's withPackages attribute: -weechat.override {configure = {availablePlugins, ...}: { +weechat.override { configure = {availablePlugins, ...}: { plugins = with availablePlugins; [ (python.withPackages (ps: with ps; [ pycrypto python-dbus ])) ]; @@ -721,5 +721,15 @@ plugin's withPackages attribute: } + +In order to also keep all default plugins installed, it is possible to use +the following method: +weechat.override { configure = { availablePlugins, ... }: { + plugins = builtins.attrValues (availablePlugins // { + python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]); + }); +}; } + + From 51d9192cddf8c749384b5feb81d5833064db3a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Wed, 4 Apr 2018 14:42:06 +0200 Subject: [PATCH 2/3] weechat: point description to documentation --- pkgs/applications/networking/irc/weechat/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index cfed44c997a..7439454489a 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -72,6 +72,11 @@ let meta = { homepage = http://www.weechat.org/; description = "A fast, light and extensible chat client"; + longDescription = '' + You can find more documentation as to how to customize this package + (eg. adding python modules for scripts that would require them, etc.) + on https://nixos.org/nixpkgs/manual/#sec-weechat . + ''; license = stdenv.lib.licenses.gpl3; maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny lheckemann ]; platforms = stdenv.lib.platforms.unix; From fe21790989824ae60e625e5116d00543f808cbc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Wed, 4 Apr 2018 14:45:08 +0200 Subject: [PATCH 3/3] weechat: forward metadata to wrapper --- pkgs/applications/networking/irc/weechat/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 7439454489a..b2ea28f0cf8 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -122,4 +122,7 @@ in if configure == null then weechat else export WEECHAT_EXTRA_LIBDIR=${pluginsDir} ${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins} exec ${weechat}/bin/weechat "$@" - '') // { unwrapped = weechat; } + '') // { + unwrapped = weechat; + meta = weechat.meta; + }