Merge pull request #41968 from aneeshusa/enable-using-klaus-with-uwsgi

Enable using klaus with uwsgi
This commit is contained in:
Frederik Rietdijk 2018-06-14 09:14:18 +02:00 committed by GitHub
commit f784a8d925
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -31,9 +31,7 @@ let
inherit python;
};
penv = python.buildEnv.override {
extraLibs = (c.pythonPackages or (self: [])) pythonPackages;
};
pythonEnv = python.withPackages (c.pythonPackages or (self: []));
uwsgiCfg = {
uwsgi =
@ -42,7 +40,7 @@ let
inherit plugins;
} // removeAttrs c [ "type" "pythonPackages" ]
// optionalAttrs (python != null) {
pythonpath = "${penv}/${python.sitePackages}";
pythonpath = "${pythonEnv}/${python.sitePackages}";
env =
# Argh, uwsgi expects list of key-values there instead of a dictionary.
let env' = c.env or [];
@ -51,7 +49,7 @@ let
then substring (stringLength "PATH=") (stringLength x) x
else null;
oldPaths = filter (x: x != null) (map getPath env');
in env' ++ [ "PATH=${optionalString (oldPaths != []) "${last oldPaths}:"}${penv}/bin" ];
in env' ++ [ "PATH=${optionalString (oldPaths != []) "${last oldPaths}:"}${pythonEnv}/bin" ];
}
else if c.type == "emperor"
then {

View File

@ -1,6 +1,6 @@
{ lib, python, fetchFromGitHub }:
python.pkgs.buildPythonApplication rec {
python.pkgs.buildPythonPackage rec {
pname = "klaus";
version = "1.2.2";

View File

@ -1339,7 +1339,7 @@ with pkgs;
kisslicer = callPackage ../tools/misc/kisslicer { };
klaus = callPackage ../servers/web-apps/klaus { };
klaus = with pythonPackages; toPythonApplication klaus;
lcdproc = callPackage ../servers/monitoring/lcdproc { };

View File

@ -6929,6 +6929,8 @@ in {
kiwisolver = callPackage ../development/python-modules/kiwisolver { };
klaus = callPackage ../development/python-modules/klaus {};
klein = callPackage ../development/python-modules/klein { };
koji = callPackage ../development/python-modules/koji { };