weechat: build with python3 by default
WeeChat also supports Python3 for scripts which should be preferred as CPython2 is about to get EOLed soon: https://weechat.org/scripts/python3/
This commit is contained in:
parent
a7c12f59f8
commit
689a50f3a2
@ -6,21 +6,21 @@
|
|||||||
, guileSupport ? true, guile
|
, guileSupport ? true, guile
|
||||||
, luaSupport ? true, lua5
|
, luaSupport ? true, lua5
|
||||||
, perlSupport ? true, perl
|
, perlSupport ? true, perl
|
||||||
, pythonSupport ? true, pythonPackages
|
, pythonSupport ? true, python3Packages
|
||||||
, rubySupport ? true, ruby
|
, rubySupport ? true, ruby
|
||||||
, tclSupport ? true, tcl
|
, tclSupport ? true, tcl
|
||||||
, extraBuildInputs ? []
|
, extraBuildInputs ? []
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pythonPackages) python;
|
inherit (python3Packages) python;
|
||||||
plugins = [
|
plugins = [
|
||||||
{ name = "perl"; enabled = perlSupport; cmakeFlag = "ENABLE_PERL"; buildInputs = [ perl ]; }
|
{ name = "perl"; enabled = perlSupport; cmakeFlag = "ENABLE_PERL"; buildInputs = [ perl ]; }
|
||||||
{ name = "tcl"; enabled = tclSupport; cmakeFlag = "ENABLE_TCL"; buildInputs = [ tcl ]; }
|
{ name = "tcl"; enabled = tclSupport; cmakeFlag = "ENABLE_TCL"; buildInputs = [ tcl ]; }
|
||||||
{ name = "ruby"; enabled = rubySupport; cmakeFlag = "ENABLE_RUBY"; buildInputs = [ ruby ]; }
|
{ name = "ruby"; enabled = rubySupport; cmakeFlag = "ENABLE_RUBY"; buildInputs = [ ruby ]; }
|
||||||
{ name = "guile"; enabled = guileSupport; cmakeFlag = "ENABLE_GUILE"; buildInputs = [ guile ]; }
|
{ name = "guile"; enabled = guileSupport; cmakeFlag = "ENABLE_GUILE"; buildInputs = [ guile ]; }
|
||||||
{ name = "lua"; enabled = luaSupport; cmakeFlag = "ENABLE_LUA"; buildInputs = [ lua5 ]; }
|
{ 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;
|
enabledPlugins = builtins.filter (p: p.enabled) plugins;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ callPackage, luaPackages, pythonPackages }:
|
{ callPackage, luaPackages }:
|
||||||
|
|
||||||
{
|
{
|
||||||
weechat-xmpp = callPackage ./weechat-xmpp {
|
weechat-xmpp = callPackage ./weechat-xmpp {
|
||||||
@ -9,13 +9,9 @@
|
|||||||
inherit (luaPackages) cjson luaffi;
|
inherit (luaPackages) cjson luaffi;
|
||||||
};
|
};
|
||||||
|
|
||||||
wee-slack = callPackage ./wee-slack {
|
wee-slack = callPackage ./wee-slack { };
|
||||||
inherit pythonPackages;
|
|
||||||
};
|
|
||||||
|
|
||||||
weechat-autosort = callPackage ./weechat-autosort { };
|
weechat-autosort = callPackage ./weechat-autosort { };
|
||||||
|
|
||||||
weechat-otr = callPackage ./weechat-otr {
|
weechat-otr = callPackage ./weechat-otr { };
|
||||||
inherit pythonPackages;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, substituteAll, buildEnv, fetchFromGitHub, pythonPackages }:
|
{ stdenv, substituteAll, buildEnv, fetchFromGitHub, python3Packages }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wee-slack";
|
pname = "wee-slack";
|
||||||
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
|
|||||||
src = ./libpath.patch;
|
src = ./libpath.patch;
|
||||||
env = "${buildEnv {
|
env = "${buildEnv {
|
||||||
name = "wee-slack-env";
|
name = "wee-slack-env";
|
||||||
paths = with pythonPackages; [ websocket_client six ];
|
paths = with python3Packages; [ websocket_client six ];
|
||||||
}}/${pythonPackages.python.sitePackages}";
|
}}/${python3Packages.python.sitePackages}";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, substituteAll, buildEnv, fetchgit, fetchFromGitHub, pythonPackages, gmp }:
|
{ stdenv, substituteAll, buildEnv, fetchgit, fetchFromGitHub, python3Packages, gmp }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# pure-python-otr (potr) requires an older version of pycrypto, which is
|
# 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.
|
# of pycrypto will be fetched from the Debian project.
|
||||||
# https://security-tracker.debian.org/tracker/source-package/python-crypto
|
# https://security-tracker.debian.org/tracker/source-package/python-crypto
|
||||||
|
|
||||||
pycrypto = pythonPackages.buildPythonPackage rec {
|
pycrypto = python3Packages.buildPythonPackage rec {
|
||||||
pname = "pycrypto";
|
pname = "pycrypto";
|
||||||
version = "2.6.1-10";
|
version = "2.6.1-10";
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
potr = pythonPackages.potr.overridePythonAttrs (oldAttrs: {
|
potr = python3Packages.potr.overridePythonAttrs (oldAttrs: {
|
||||||
propagatedBuildInputs = [ pycrypto ];
|
propagatedBuildInputs = [ pycrypto ];
|
||||||
});
|
});
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
|
|||||||
env = "${buildEnv {
|
env = "${buildEnv {
|
||||||
name = "weechat-otr-env";
|
name = "weechat-otr-env";
|
||||||
paths = [ potr pycrypto ];
|
paths = [ potr pycrypto ];
|
||||||
}}/${pythonPackages.python.sitePackages}";
|
}}/${python3Packages.python.sitePackages}";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ lib, runCommand, writeScriptBin, buildEnv
|
{ lib, runCommand, writeScriptBin, buildEnv
|
||||||
, pythonPackages, perlPackages, runtimeShell
|
, python3Packages, perlPackages, runtimeShell
|
||||||
}:
|
}:
|
||||||
|
|
||||||
weechat:
|
weechat:
|
||||||
@ -17,11 +17,11 @@ let
|
|||||||
in rec {
|
in rec {
|
||||||
python = (simplePlugin "python") // {
|
python = (simplePlugin "python") // {
|
||||||
extraEnv = ''
|
extraEnv = ''
|
||||||
export PATH="${pythonPackages.python}/bin:$PATH"
|
export PATH="${python3Packages.python}/bin:$PATH"
|
||||||
'';
|
'';
|
||||||
withPackages = pkgsFun: (python // {
|
withPackages = pkgsFun: (python // {
|
||||||
extraEnv = ''
|
extraEnv = ''
|
||||||
export PYTHONHOME="${pythonPackages.python.withPackages pkgsFun}"
|
export PYTHONHOME="${python3Packages.python.withPackages pkgsFun}"
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user