mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
Merge pull request #41968 from aneeshusa/enable-using-klaus-with-uwsgi
Enable using klaus with uwsgi
This commit is contained in:
commit
f784a8d925
|
@ -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 {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, python, fetchFromGitHub }:
|
||||
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
python.pkgs.buildPythonPackage rec {
|
||||
pname = "klaus";
|
||||
version = "1.2.2";
|
||||
|
|
@ -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 { };
|
||||
|
||||
|
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue