diff --git a/nixos/modules/services/web-servers/uwsgi.nix b/nixos/modules/services/web-servers/uwsgi.nix index 14596bb3add0..356b896a6dc9 100644 --- a/nixos/modules/services/web-servers/uwsgi.nix +++ b/nixos/modules/services/web-servers/uwsgi.nix @@ -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 { diff --git a/pkgs/servers/web-apps/klaus/default.nix b/pkgs/development/python-modules/klaus/default.nix similarity index 95% rename from pkgs/servers/web-apps/klaus/default.nix rename to pkgs/development/python-modules/klaus/default.nix index 81d1e57e7a04..0740cfa84bb7 100644 --- a/pkgs/servers/web-apps/klaus/default.nix +++ b/pkgs/development/python-modules/klaus/default.nix @@ -1,6 +1,6 @@ { lib, python, fetchFromGitHub }: -python.pkgs.buildPythonApplication rec { +python.pkgs.buildPythonPackage rec { pname = "klaus"; version = "1.2.2"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dcfc3646bcc6..cf5f480ec3a6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9f0a0f45b12d..a3a80f998f7a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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 { };