uwsgi: remove python2
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
libxcrypt,
|
||||
expat,
|
||||
zlib,
|
||||
# plugins: list of strings, eg. [ "python2" "python3" ]
|
||||
# plugins: list of strings, eg. [ "python3" ]
|
||||
plugins ? [ ],
|
||||
pam,
|
||||
withPAM ? stdenv.hostPlatform.isLinux,
|
||||
@@ -16,7 +16,6 @@
|
||||
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
|
||||
libcap,
|
||||
withCap ? stdenv.hostPlatform.isLinux,
|
||||
python2,
|
||||
python3,
|
||||
ncurses,
|
||||
ruby,
|
||||
@@ -31,25 +30,20 @@ let
|
||||
apxs2Support = false;
|
||||
};
|
||||
|
||||
pythonPlugin =
|
||||
pkg:
|
||||
lib.nameValuePair "python${if pkg.isPy2 then "2" else "3"}" {
|
||||
interpreter = pkg.pythonOnBuildForHost.interpreter;
|
||||
available = lib.listToAttrs [
|
||||
(lib.nameValuePair "python3" {
|
||||
interpreter = python3.pythonOnBuildForHost.interpreter;
|
||||
path = "plugins/python";
|
||||
inputs = [
|
||||
pkg
|
||||
python3
|
||||
ncurses
|
||||
];
|
||||
install = ''
|
||||
install -Dm644 uwsgidecorators.py $out/${pkg.sitePackages}/uwsgidecorators.py
|
||||
${pkg.pythonOnBuildForHost.executable} -m compileall $out/${pkg.sitePackages}/
|
||||
${pkg.pythonOnBuildForHost.executable} -O -m compileall $out/${pkg.sitePackages}/
|
||||
install -Dm644 uwsgidecorators.py $out/${python3.sitePackages}/uwsgidecorators.py
|
||||
${python3.pythonOnBuildForHost.executable} -m compileall $out/${python3.sitePackages}/
|
||||
${python3.pythonOnBuildForHost.executable} -O -m compileall $out/${python3.sitePackages}/
|
||||
'';
|
||||
};
|
||||
|
||||
available = lib.listToAttrs [
|
||||
(pythonPlugin python2)
|
||||
(pythonPlugin python3)
|
||||
})
|
||||
(lib.nameValuePair "rack" {
|
||||
path = "plugins/rack";
|
||||
inputs = [ ruby ];
|
||||
@@ -91,7 +85,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "unbit";
|
||||
repo = "uwsgi";
|
||||
rev = finalAttrs.version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-/7Z9lq7JiGBrTpmtbIEqpMg7nw9SVm8ypmzd1/p6xgU=";
|
||||
};
|
||||
|
||||
@@ -128,7 +122,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
UWSGI_INCLUDES = lib.optionalString withCap "${libcap.dev}/include";
|
||||
|
||||
passthru = {
|
||||
inherit python2 python3;
|
||||
inherit python3;
|
||||
tests.uwsgi = nixosTests.uwsgi;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user