diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 343c1fc5933d..2338cf6e6fee 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -12,6 +12,8 @@ ## Backward Incompatibilities {#sec-release-24.11-incompatibilities} +- `nginx` package no longer includes `gd` and `geoip` dependencies. For enabling it, override `nginx` package with the optionals `withImageFilter` and `withGeoIP`. + - `nvimpager` was updated to version 0.13.0, which changes the order of user and nvimpager settings: user commands in `-c` and `--cmd` now override the respective default settings because they are executed later. diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 67e84f08448e..bc97c4972be7 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -4,6 +4,8 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt , nixosTests , installShellFiles, substituteAll, removeReferencesTo, gd, geoip, perl , withDebug ? false +, withGeoIP ? false +, withImageFilter ? false , withKTLS ? true , withStream ? true , withMail ? false @@ -64,9 +66,11 @@ stdenv.mkDerivation { removeReferencesTo ] ++ nativeBuildInputs; - buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ] + buildInputs = [ openssl zlib pcre libxml2 libxslt perl ] ++ buildInputs - ++ mapModules "inputs"; + ++ mapModules "inputs" + ++ lib.optional withGeoIP geoip + ++ lib.optional withImageFilter gd; configureFlags = [ "--sbin-path=bin/nginx" @@ -112,10 +116,9 @@ stdenv.mkDerivation { "--with-http_perl_module" "--with-perl=${perl}/bin/perl" "--with-perl_modules_path=lib/perl5" - ] ++ lib.optional withSlice "--with-http_slice_module" - ++ lib.optional (gd != null) "--with-http_image_filter_module" - ++ lib.optional (geoip != null) "--with-http_geoip_module" - ++ lib.optional (withStream && geoip != null) "--with-stream_geoip_module" + ] ++ lib.optional withImageFilter "--with-http_image_filter_module" + ++ lib.optional withSlice "--with-http_slice_module" + ++ lib.optionals withGeoIP ([ "--with-http_geoip_module" ] ++ lib.optional withStream "--with-stream_geoip_module") ++ lib.optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio" ++ configureFlags ++ map (mod: "--add-module=${mod.src}") modules;