Merge pull request #44729 from Ma27/fix-weechat-xmpp

weechat-xmpp: create proper runtime environment
This commit is contained in:
Daiderd Jordan 2018-08-13 21:14:14 +02:00 committed by GitHub
commit 3d436409bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, xmpppy }:
{ stdenv, fetchFromGitHub, xmpppy, pydns, substituteAll, buildEnv }:
stdenv.mkDerivation {
name = "weechat-jabber-2017-08-30";
@ -15,15 +15,14 @@ stdenv.mkDerivation {
cp jabber.py $out/share/jabber.py
'';
buildInputs = [ xmpppy ];
postPatch = ''
substituteInPlace jabber.py \
--replace "__NIX_OUTPUT__" "${xmpppy}/lib/python2.7/site-packages"
'';
patches = [
./libpath.patch
(substituteAll {
src = ./libpath.patch;
env = "${buildEnv {
name = "weechat-xmpp-env";
paths = [ pydns xmpppy ];
}}/lib/python2.7/site-packages";
})
];
meta = with stdenv.lib; {

View File

@ -8,7 +8,7 @@ index 27006a3..e53c2c0 100644
+import sys
+
+sys.path.append('__NIX_OUTPUT__')
+sys.path.append('@env@')
+
+
import_ok = True

View File

@ -18956,7 +18956,9 @@ with pkgs;
inherit (luaPackages) cjson;
};
weechat-xmpp = callPackage ../applications/networking/instant-messengers/weechat-xmpp {};
weechat-xmpp = callPackage ../applications/networking/instant-messengers/weechat-xmpp {
inherit (pythonPackages) pydns;
};
westonLite = weston.override {
pango = null;