mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #68110 from Ma27/weechat-python3
weechat: build with python3 by default
This commit is contained in:
commit
734da72661
@ -422,6 +422,12 @@
|
||||
It was not useful except for debugging purposes and was confusingly set as default in some circumstances.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The WeeChat plugin <literal>pkgs.weechatScripts.weechat-xmpp</literal> has been removed as it doesn't receive
|
||||
any updates from upstream and depends on outdated Python2-based modules.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</section>
|
||||
@ -718,7 +724,14 @@
|
||||
Note: There's been some issues with python-cherrypy, which is used by the dashboard
|
||||
and prometheus mgr modules (and possibly others), hence 0000-dont-check-cherrypy-version.patch.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>pkgs.weechat</literal> is now compiled against <literal>pkgs.python3</literal>.
|
||||
Weechat also recommends <link xlink:href="https://weechat.org/scripts/python3/">to use Python3
|
||||
in their docs.</link>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -6,21 +6,21 @@
|
||||
, guileSupport ? true, guile
|
||||
, luaSupport ? true, lua5
|
||||
, perlSupport ? true, perl
|
||||
, pythonSupport ? true, pythonPackages
|
||||
, pythonSupport ? true, python3Packages
|
||||
, rubySupport ? true, ruby
|
||||
, tclSupport ? true, tcl
|
||||
, extraBuildInputs ? []
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pythonPackages) python;
|
||||
inherit (python3Packages) python;
|
||||
plugins = [
|
||||
{ name = "perl"; enabled = perlSupport; cmakeFlag = "ENABLE_PERL"; buildInputs = [ perl ]; }
|
||||
{ name = "tcl"; enabled = tclSupport; cmakeFlag = "ENABLE_TCL"; buildInputs = [ tcl ]; }
|
||||
{ name = "ruby"; enabled = rubySupport; cmakeFlag = "ENABLE_RUBY"; buildInputs = [ ruby ]; }
|
||||
{ name = "guile"; enabled = guileSupport; cmakeFlag = "ENABLE_GUILE"; buildInputs = [ guile ]; }
|
||||
{ name = "lua"; enabled = luaSupport; cmakeFlag = "ENABLE_LUA"; buildInputs = [ lua5 ]; }
|
||||
{ name = "python"; enabled = pythonSupport; cmakeFlag = "ENABLE_PYTHON"; buildInputs = [ python ]; }
|
||||
{ name = "python"; enabled = pythonSupport; cmakeFlag = "ENABLE_PYTHON3"; buildInputs = [ python ]; }
|
||||
];
|
||||
enabledPlugins = builtins.filter (p: p.enabled) plugins;
|
||||
|
||||
|
@ -1,21 +1,13 @@
|
||||
{ callPackage, luaPackages, pythonPackages }:
|
||||
{ callPackage, luaPackages }:
|
||||
|
||||
{
|
||||
weechat-xmpp = callPackage ./weechat-xmpp {
|
||||
inherit (pythonPackages) pydns;
|
||||
};
|
||||
|
||||
weechat-matrix-bridge = callPackage ./weechat-matrix-bridge {
|
||||
inherit (luaPackages) cjson luaffi;
|
||||
};
|
||||
|
||||
wee-slack = callPackage ./wee-slack {
|
||||
inherit pythonPackages;
|
||||
};
|
||||
wee-slack = callPackage ./wee-slack { };
|
||||
|
||||
weechat-autosort = callPackage ./weechat-autosort { };
|
||||
|
||||
weechat-otr = callPackage ./weechat-otr {
|
||||
inherit pythonPackages;
|
||||
};
|
||||
weechat-otr = callPackage ./weechat-otr { };
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, substituteAll, buildEnv, fetchFromGitHub, pythonPackages }:
|
||||
{ stdenv, substituteAll, buildEnv, fetchFromGitHub, python3Packages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wee-slack";
|
||||
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
|
||||
src = ./libpath.patch;
|
||||
env = "${buildEnv {
|
||||
name = "wee-slack-env";
|
||||
paths = with pythonPackages; [ websocket_client six ];
|
||||
}}/${pythonPackages.python.sitePackages}";
|
||||
paths = with python3Packages; [ websocket_client six ];
|
||||
}}/${python3Packages.python.sitePackages}";
|
||||
})
|
||||
];
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, substituteAll, buildEnv, fetchgit, fetchFromGitHub, pythonPackages, gmp }:
|
||||
{ stdenv, substituteAll, buildEnv, fetchgit, fetchFromGitHub, python3Packages, gmp }:
|
||||
|
||||
let
|
||||
# pure-python-otr (potr) requires an older version of pycrypto, which is
|
||||
@ -6,7 +6,7 @@ let
|
||||
# of pycrypto will be fetched from the Debian project.
|
||||
# https://security-tracker.debian.org/tracker/source-package/python-crypto
|
||||
|
||||
pycrypto = pythonPackages.buildPythonPackage rec {
|
||||
pycrypto = python3Packages.buildPythonPackage rec {
|
||||
pname = "pycrypto";
|
||||
version = "2.6.1-10";
|
||||
|
||||
@ -24,7 +24,7 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
potr = pythonPackages.potr.overridePythonAttrs (oldAttrs: {
|
||||
potr = python3Packages.potr.overridePythonAttrs (oldAttrs: {
|
||||
propagatedBuildInputs = [ pycrypto ];
|
||||
});
|
||||
in stdenv.mkDerivation rec {
|
||||
@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
|
||||
env = "${buildEnv {
|
||||
name = "weechat-otr-env";
|
||||
paths = [ potr pycrypto ];
|
||||
}}/${pythonPackages.python.sitePackages}";
|
||||
}}/${python3Packages.python.sitePackages}";
|
||||
})
|
||||
];
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
{ stdenv, fetchFromGitHub, xmpppy, pydns, substituteAll, buildEnv }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "weechat-jabber-2017-08-30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "weechat-xmpp";
|
||||
owner = "sleduc";
|
||||
sha256 = "0s02xs0ynld9cxxzj07al364sfglyc5ir1i82133mq0s8cpphnxv";
|
||||
rev = "8f6c21f5a160c9318c7a2d8fd5dcac7ab2e0d843";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share
|
||||
cp jabber.py $out/share/jabber.py
|
||||
'';
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./libpath.patch;
|
||||
env = "${buildEnv {
|
||||
name = "weechat-xmpp-env";
|
||||
paths = [ pydns xmpppy ];
|
||||
}}/lib/python2.7/site-packages";
|
||||
})
|
||||
];
|
||||
|
||||
passthru.scripts = [ "jabber.py" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A fork of the jabber plugin for weechat";
|
||||
homepage = "https://github.com/sleduc/weechat-xmpp";
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
diff --git a/jabber.py b/jabber.py
|
||||
index 27006a3..e53c2c0 100644
|
||||
--- a/jabber.py
|
||||
+++ b/jabber.py
|
||||
@@ -95,6 +95,11 @@ SCRIPT_COMMAND = SCRIPT_NAME
|
||||
import re
|
||||
import warnings
|
||||
|
||||
+import sys
|
||||
+
|
||||
+sys.path.append('@env@')
|
||||
+
|
||||
+
|
||||
import_ok = True
|
||||
|
||||
try:
|
@ -1,5 +1,5 @@
|
||||
{ lib, runCommand, writeScriptBin, buildEnv
|
||||
, pythonPackages, perlPackages, runtimeShell
|
||||
, python3Packages, perlPackages, runtimeShell
|
||||
}:
|
||||
|
||||
weechat:
|
||||
@ -17,11 +17,11 @@ let
|
||||
in rec {
|
||||
python = (simplePlugin "python") // {
|
||||
extraEnv = ''
|
||||
export PATH="${pythonPackages.python}/bin:$PATH"
|
||||
export PATH="${python3Packages.python}/bin:$PATH"
|
||||
'';
|
||||
withPackages = pkgsFun: (python // {
|
||||
extraEnv = ''
|
||||
export PYTHONHOME="${pythonPackages.python.withPackages pkgsFun}"
|
||||
export PYTHONHOME="${python3Packages.python.withPackages pkgsFun}"
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
@ -380,7 +380,6 @@ mapAliases ({
|
||||
virtviewer = virt-viewer; # added 2015-12-24
|
||||
vorbisTools = vorbis-tools; # added 2016-01-26
|
||||
webkit = webkitgtk; # added 2019-03-05
|
||||
weechat-xmpp = weechatScripts.weechat-xmpp; # added 2018-09-06
|
||||
weechat-matrix-bridge = weechatScripts.weechat-matrix-bridge; # added 2018-09-06
|
||||
wineStaging = wine-staging; # added 2018-01-08
|
||||
winusb = woeusb; # added 2017-12-22
|
||||
|
Loading…
Reference in New Issue
Block a user