forked from mirrors/nixpkgs
weechat-xmpp: create proper runtime environment
The `weechat-xmpp` plugin requires `pydns` to properly resolve the XMPP host. Furthermore it's much easier to use substituteAll rather than messing around with substituteInPlace in a patched file.
This commit is contained in:
parent
eb0207f132
commit
09e58bc4e7
|
@ -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; {
|
||||
|
|
|
@ -8,7 +8,7 @@ index 27006a3..e53c2c0 100644
|
|||
|
||||
+import sys
|
||||
+
|
||||
+sys.path.append('__NIX_OUTPUT__')
|
||||
+sys.path.append('@env@')
|
||||
+
|
||||
+
|
||||
import_ok = True
|
||||
|
|
|
@ -18982,7 +18982,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;
|
||||
|
|
Loading…
Reference in a new issue