From a2ab5eee25b4e76170fe4504992fda7e811d8a74 Mon Sep 17 00:00:00 2001 From: Rohit Singh Date: Wed, 11 Feb 2026 14:09:21 -0500 Subject: [PATCH] uwsgi: enable http plugin and expose headers for SSL detection Add the http plugin to the uWSGI build. uWSGI enables HTTPS support in the http plugin only when OpenSSL headers are detected at build time. Populate UWSGI_INCLUDES with the include paths of all build inputs so uwsgiconfig.py can discover OpenSSL and other optional features correctly. --- pkgs/by-name/uw/uwsgi/package.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/uw/uwsgi/package.nix b/pkgs/by-name/uw/uwsgi/package.nix index 84f42a4915df..9af8e230f42b 100644 --- a/pkgs/by-name/uw/uwsgi/package.nix +++ b/pkgs/by-name/uw/uwsgi/package.nix @@ -6,6 +6,7 @@ jansson, pcre2, libxcrypt, + openssl, expat, zlib, # plugins: list of strings, eg. [ "python3" ] @@ -64,6 +65,12 @@ let ] ++ php-embed.unwrapped.buildInputs; }) + (lib.nameValuePair "http" { + # usage: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html + # usage: https://uwsgi-docs.readthedocs.io/en/latest/HTTPS.html + path = "plugins/http"; + inputs = [ openssl.dev ]; + }) ]; getPlugin = @@ -119,7 +126,11 @@ stdenv.mkDerivation (finalAttrs: { lib.optional withPAM "pam" ++ lib.optional withSystemd "systemd_logger" ); - UWSGI_INCLUDES = lib.optionalString withCap "${libcap.dev}/include"; + # UWSGI_INCLUDES environment variable required for "auto" plugins + # to be detected. See uwsgiconfig.py for more details. + UWSGI_INCLUDES = lib.concatStringsSep "," ( + map (p: "${lib.getDev p}/include") finalAttrs.buildInputs + ); passthru = { inherit python3;