From aaf6f0971794d3ea0b7f9ec8717c488793a679d9 Mon Sep 17 00:00:00 2001 From: Benjamin Esham Date: Thu, 8 Aug 2019 11:34:44 -0400 Subject: [PATCH] weechat: prevent impure use of system Python (#64262) --- pkgs/applications/networking/irc/weechat/wrapper.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/irc/weechat/wrapper.nix b/pkgs/applications/networking/irc/weechat/wrapper.nix index 6dcd9a31e5e..c773aecf289 100644 --- a/pkgs/applications/networking/irc/weechat/wrapper.nix +++ b/pkgs/applications/networking/irc/weechat/wrapper.nix @@ -15,8 +15,10 @@ let availablePlugins = let simplePlugin = name: {pluginFile = "${weechat.${name}}/lib/weechat/plugins/${name}.so";}; in rec { - python = { - pluginFile = "${weechat.python}/lib/weechat/plugins/python.so"; + python = (simplePlugin "python") // { + extraEnv = '' + export PATH="${pythonPackages.python}/bin:$PATH" + ''; withPackages = pkgsFun: (python // { extraEnv = '' export PYTHONHOME="${pythonPackages.python.withPackages pkgsFun}"